Skip to content

Commit 415bf5f

Browse files
committed
Run tests with VPM packages
1 parent 4904952 commit 415bf5f

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222

2323
jobs:
2424
test:
25-
name: Test in ${{ matrix.testMode }} on ${{ matrix.unityVersion }}
25+
name: Test in ${{ matrix.testMode }} on ${{ matrix.unityVersion }} with VPM packages ${{ matrix.vpmPackages }}
2626
runs-on: ubuntu-latest
2727
strategy:
2828
fail-fast: false
@@ -34,6 +34,10 @@ jobs:
3434
testMode:
3535
- playmode
3636
- standalone
37+
vpmPackages:
38+
- ''
39+
- 'nadena.dev.ndmf'
40+
- 'nadena.dev.modular-avatar'
3741
steps:
3842
- name: Create package testing project
3943
uses: RamType0/create-unity-project@v0.2.0
@@ -45,7 +49,27 @@ jobs:
4549
uses: actions/checkout@v4
4650
with:
4751
path: ${{ env.PACKAGE_PATH }}
48-
52+
- name: Setup vrc-get
53+
if: ${{ matrix.vpmPackages }} != ''
54+
uses: anatawa12/sh-actions/setup-vrc-get@master
55+
- name: Install VPM packages
56+
if: ${{ matrix.vpmPackages }} != ''
57+
working-directory: ${{ env.PROJECT_PATH }}
58+
run: |
59+
printf '%s\n' "$VPM_PACKAGES" | while IFS= read -r package; do
60+
if [ -n "${package:-}" ]; then
61+
echo "installing $package" >&2
62+
vrc-get install "$package"
63+
fi
64+
done
65+
shell: bash
66+
env:
67+
VPM_PACKAGES: ${{ matrix.vpmPackages }}
68+
- name: Resolve VPM packages
69+
uses: anatawa12/sh-actions/resolve-vpm-packages@master
70+
if: ${{ matrix.vpmPackages }} != ''
71+
with:
72+
repos: 'https://vpm.nadena.dev/vpm.json'
4973
- name: Create LFS file list
5074
working-directory: ${{ env.PACKAGE_PATH }}
5175
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

0 commit comments

Comments
 (0)