Merge pull request #1368 from anatawa12/add-remove-button #3364
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: GameCI | |
on: | |
push: | |
branches: [ master, master-* ] | |
pull_request_target: {} | |
workflow_dispatch: {} | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- unity: 2022 | |
projectRef: de0b2dde7824e33986730c40866d74cfe526942b # project-for-test-2022 | |
unity: | |
- 2022 | |
permissions: | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.projectRef }} | |
- uses: actions/checkout@v4 | |
with: | |
path: Packages/com.anatawa12.avatar-optimizer | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: anatawa12/sh-actions/setup-vrc-get@master | |
- run: vrc-get install -y com.vrchat.avatars | |
- uses: anatawa12/sh-actions/resolve-vpm-packages@master | |
with: | |
repos: | | |
https://vpm.anatawa12.com/vpm.json | |
https://vpm.nadena.dev/vpm-prerelease.json | |
- uses: actions/cache@v4 | |
with: | |
path: Library | |
key: Library-${{ matrix.unity }} | |
restore-keys: Library-${{ matrix.unity }} | |
- uses: game-ci/unity-test-runner@v3 | |
id: gameci | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_V3 }} | |
with: | |
testMode: EditMode | |
githubToken: ${{ github.token }} | |
coverageOptions: generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+com.anatawa12.avatar-optimizer.*,-*.test.* | |
customParameters: | |
checkName: Test results ${{ matrix.unity }} | |
- name: "Show files at root folder to find crash log" | |
if: always() | |
run: ls -la | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Test results ${{ matrix.unity }} | |
path: ${{ steps.gameci.outputs.artifactsPath }} | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: Coverage results ${{ matrix.unity }} | |
path: ${{ steps.gameci.outputs.coveragePath }} | |
conclude-gameci: | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
needs: [build-and-test] | |
steps: | |
- name: Conclude Tests | |
env: { NEEDS: "${{ toJSON(needs) }}" } | |
run: | | |
echo "$NEEDS" | jq -c '. | to_entries[] | [.key, .value.result]' | |
echo "$NEEDS" | jq -e '. | all(.result == "success")' > /dev/null |