From caf627926e745b8df5a9952762d4e0abd0260da3 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 17 Dec 2023 14:35:04 +0900 Subject: [PATCH] ci: Enable 2022 tests --- .../ProjectRoot/Packages/vpm-manifest.json | 8 ++--- .github/ProjectRoot/vpm-manifest.json | 22 +++++++++++++ .github/workflows/gameci.yml | 32 ++++++++++++------- 3 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 .github/ProjectRoot/vpm-manifest.json diff --git a/.github/ProjectRoot/Packages/vpm-manifest.json b/.github/ProjectRoot/Packages/vpm-manifest.json index 14313dba..315afc36 100644 --- a/.github/ProjectRoot/Packages/vpm-manifest.json +++ b/.github/ProjectRoot/Packages/vpm-manifest.json @@ -1,7 +1,7 @@ { "dependencies": { "com.vrchat.avatars": { - "version": "3.2.0" + "version": "3.4.2" }, "nadena.dev.ndmf": { "version": "0.3.0" @@ -9,13 +9,13 @@ }, "locked": { "com.vrchat.avatars": { - "version": "3.4.0", + "version": "3.4.2", "dependencies": { - "com.vrchat.base": "3.4.0" + "com.vrchat.base": "3.4.2" } }, "com.vrchat.base": { - "version": "3.4.0", + "version": "3.4.2", "dependencies": {} } } diff --git a/.github/ProjectRoot/vpm-manifest.json b/.github/ProjectRoot/vpm-manifest.json new file mode 100644 index 00000000..d1c81e55 --- /dev/null +++ b/.github/ProjectRoot/vpm-manifest.json @@ -0,0 +1,22 @@ +{ + "dependencies": { + "com.vrchat.avatars": { + "version": "3.5.0" + }, + "nadena.dev.ndmf": { + "version": "0.3.0" + } + }, + "locked": { + "com.vrchat.avatars": { + "version": "3.5.0", + "dependencies": { + "com.vrchat.base": "3.5.0" + } + }, + "com.vrchat.base": { + "version": "3.5.0", + "dependencies": {} + } + } +} \ No newline at end of file diff --git a/.github/workflows/gameci.yml b/.github/workflows/gameci.yml index 4a992db5..c17ecc5d 100644 --- a/.github/workflows/gameci.yml +++ b/.github/workflows/gameci.yml @@ -45,17 +45,30 @@ jobs: name: Unit tests strategy: matrix: - unity_version: [ auto ] + unity_major_version: [ 2019, 2022 ] sdk: [ vrcsdk ] runs-on: ubuntu-latest permissions: checks: write contents: read steps: + - id: configure + name: Configure + env: + unity_major_version: ${{ matrix.unity_major_version }} + run: | + if [ $unity_major_version == 2019 ]; then + echo "unity_version=2019.4.31f1" >> $GITHUB_ENV + elif [ $unity_major_version == 2022 ]; then + echo "unity_version=2022.3.6f1" >> $GITHUB_ENV + else + echo "Invalid unity_major_version: $unity_major_version" + exit 1 + fi - id: setup name: Setup env: - unity_version: ${{ matrix.unity_version }} + unity_version: ${{ steps.configure.outputs.unity_version }} sdk: ${{ matrix.sdk }} run: | set -x @@ -63,13 +76,10 @@ jobs: sudo apt-get install xmlstarlet -y should_test=true - if [ $sdk == vrcsdk ] && [ $unity_version != auto ]; then - should_test=false - fi echo should_test=$should_test >> $GITHUB_OUTPUT can_fail=false - if [ $sdk == standalone ] || [ $unity_version != auto ]; then + if [ $sdk == standalone ]; then can_fail=$should_test fi echo can_fail=$can_fail >> $GITHUB_OUTPUT @@ -117,7 +127,7 @@ jobs: if: ${{ steps.setup.outputs.should_test == 'true' }} with: path: Library - key: Library-${{ matrix.unity_version }}-${{ matrix.sdk }} + key: Library-${{ steps.configure.outputs.unity_version }}-${{ matrix.sdk }} restore-keys: Library- - uses: game-ci/unity-test-runner@v3 @@ -129,7 +139,7 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: testMode: EditMode - unityVersion: ${{ matrix.unity_version }} + unityVersion: ${{ steps.configure.outputs.unity_version }} githubToken: ${{ github.token }} coverageOptions: generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+nadena.dev.* customParameters: -nographics -assemblyNames Tests @@ -141,7 +151,7 @@ jobs: name: Determine conclusion if: ${{ steps.setup.outputs.should_test == 'true' }} env: - unity_version: ${{ matrix.unity_version }} + unity_version: ${{ steps.configure.outputs.unity_version }} sdk_platform: ${{ matrix.sdk }} gameci_outcome: ${{ steps.gameci.outcome }} can_fail: ${{ steps.setup.outputs.can_fail }} @@ -175,8 +185,8 @@ jobs: echo matrix_output=$output >> $GITHUB_OUTPUT - uses: actions/upload-artifact@v3 - if: ${{ steps.setup.outputs.should_test == 'true' && matrix.sdk == 'vrcsdk' && matrix.unity_version == 'auto' }} + if: ${{ steps.setup.outputs.should_test == 'true' && matrix.sdk == 'vrcsdk' }} continue-on-error: true with: - name: Coverage results ${{ matrix.unity_version }} ${{ matrix.sdk }} + name: Coverage results ${{ steps.configure.outputs.unity_version }} ${{ matrix.sdk }} path: ${{ steps.gameci.outputs.coveragePath }} \ No newline at end of file