This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
Update CI.yaml #47
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: Automatic CI | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
testRunner: | |
name: Test in ${{ matrix.testMode }} ✨ | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
testMode: | |
- EditMode | |
- PlayMode | |
steps: | |
- name: Checkout code ✅ | |
uses: actions/checkout@v4 | |
- name: Create LFS file list 📜 | |
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id | |
- name: Restore LFS cache 🔄 | |
uses: actions/cache@v3 | |
id: lfs-cache | |
with: | |
path: .git/lfs | |
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} | |
- name: Git LFS Pull 📥 | |
run: | | |
git lfs pull | |
git add . | |
git reset --hard | |
- name: Restore Library cache 🔄 | |
uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-test-project-${{ matrix.targetPlatform }} | |
restore-keys: | | |
Library-test-project- | |
Library- | |
- name: Run tests ⏯ 📑 | |
uses: game-ci/[email protected] | |
id: testRunner | |
with: | |
testMode: ${{ matrix.testMode }} | |
checkName: ${{ matrix.testMode }} test results | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
projectPath: ${{ vars.projectPath }} | |
- name: Upload Artifact 📦 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test results (${{ matrix.testMode }}) | |
path: ${{ steps.testRunner.outputs.artifactsPath }} |