Skip to content

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #8

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #8

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.testMode }} on ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- .
unityVersion:
- 2020.3.8f1
testMode:
- editmode
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
# Cache
- name: Cache
uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}
restore-keys: |
Library-
# Tests
- name: Tests
uses: game-ci/unity-test-runner@v2
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2020 }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
checkName: ${{ matrix.testMode }} Test Results
# Upload Artifact
- name: Upload Artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
reportSlack:
name: ${{ matrix.testMode }} report
runs-on: ubuntu-latest
strategy:
matrix:
testMode:
- editmode
needs: test
steps:
# Download Artifact
- name: Download Artifact
uses: actions/download-artifact@main
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ matrix.testMode }}-artifacts
# Clone NUnitXmlReporter
- name: Clone NUnitXmlReporter
run: git clone https://github.com/pCYSl5EDgo/NUnitXmlReporter.git
# Setup .NET
- name: Setup .NET
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '3.0.100'
# Report Result to Slack
- name: Report Result to Slack
env:
SLACK: ${{ secrets.SLACK_HOOK }}
run: |
cd NUnitXmlReporter
dotnet run ../${{ matrix.testMode }}-artifacts/${{ matrix.testMode }}-results.xml ../slackJson --slack-block $GITHUB_REPOSITORY $GITHUB_SHA || INPUT_RESULT=$?
cd ..
curl -X POST -H 'ContentX-type:application/json' --data "$(cat slackJson)" $SLACK
exit $INPUT_RESULT