Bump softprops/action-gh-release from 1 to 2 #383
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
test-unity: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unityVersion: | |
- 2021.3.27f1 | |
- 2022.3.2f1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: ${{github.repository_owner}} | |
- name: Parse major unity version | |
id: major-unity-version | |
uses: actions/github-script@v7 | |
env: | |
UNITY_VERSION: ${{ matrix.unityVersion }} | |
with: | |
result-encoding: string | |
script: return process.env['UNITY_VERSION'].substr(0, 4); | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ResponsibleUnity/Library | |
key: ${{ steps.major-unity-version.outputs.result }}-Library-${{ hashFiles('com.beatwaves.responsible/**', 'ResponsibleUnity/**', 'src/Responsible.Tests/**') }} | |
restore-keys: | | |
${{ steps.major-unity-version.outputs.result }}-Library- | |
- name: Run tests | |
id: tests | |
uses: game-ci/unity-test-runner@v4 | |
env: | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
projectPath: ResponsibleUnity | |
unityVersion: ${{ matrix.unityVersion }} | |
coverageOptions: assemblyFilters:+Responsible,+Responsible.Editor | |
customParameters: -nographics -disable-assembly-updater | |
- name: Push to testspace | |
if: ${{ always() }} | |
run: testspace | |
[Unity-${{ matrix.unityVersion }}]${{ steps.tests.outputs.artifactsPath }}/editmode-results.xml | |
[Unity-${{ matrix.unityVersion }}]${{ steps.tests.outputs.artifactsPath }}/playmode-results.xml | |
- name: Push to codecov.io | |
if: ${{ always() }} | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: Unity${{ matrix.unityVersion }} | |
files: "${{ steps.tests.outputs.coveragePath }}/ResponsibleUnity-opencov/EditMode/TestCoverageResults_0000.xml,\ | |
${{ steps.tests.outputs.coveragePath }}/ResponsibleUnity-opencov/EditMode/TestCoverageResults_0001.xml,\ | |
${{ steps.tests.outputs.coveragePath }}/ResponsibleUnity-opencov/PlayMode/TestCoverageResults_0000.xml,\ | |
${{ steps.tests.outputs.coveragePath }}/ResponsibleUnity-opencov/PlayMode/TestCoverageResults_0001.xml" | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Archive test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unity Test Results ${{ matrix.unityVersion }} | |
path: ${{ steps.tests.outputs.artifactsPath }} | |
- name: Archive coverage results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unity Coverage Results ${{ matrix.unityVersion }} | |
path: ${{ steps.tests.outputs.coveragePath }} | |
test-netstandard: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: src | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6' | |
- uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: ${{github.repository_owner}} | |
- name: Run Tests | |
id: run-tests | |
run: | | |
dotnet test --collect:"XPlat Code Coverage" --results-directory TestResults --settings runsettings.xml --logger "trx" | |
echo "::set-output name=tests::TestResults/*.trx" | |
- name: Push to testspace | |
if: ${{ always() }} | |
run: testspace [.NET]${{ steps.run-tests.outputs.tests }} | |
- name: Push to codecov.io | |
uses: codecov/codecov-action@v4 | |
if: ${{ always() }} | |
with: | |
flags: netstandard | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Archive test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: netstandard Test Results | |
path: src/TestResults | |
test-mutation-core: | |
uses: ./.github/workflows/stryker.yml | |
with: | |
working-directory : src/Responsible.Tests | |
secrets: | |
STRYKER_KEY: ${{ secrets.STRYKER_KEY }} | |
test-mutation-gherkin: | |
uses: ./.github/workflows/stryker.yml | |
with: | |
working-directory: src/ResponsibleGherkin.Tests | |
secrets: | |
STRYKER_KEY: ${{ secrets.STRYKER_KEY }} | |
inspectcode: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: src | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6' | |
- name: dotnet restore | |
run: | | |
dotnet restore | |
dotnet tool restore | |
- name: Run ReSharper | |
run: ./inspectcode.sh | |
- name: Archive ReSharper run | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ReSharper | |
path: src/inspect.xml | |
- name: ReSharper XML -> GitHub output | |
if: ${{ always() }} | |
uses: glassechidna/resharper-action@v1 | |
with: | |
report: src/inspect.xml |