Test specification #1006
This file contains hidden or 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: Test specification | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| generic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 8 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: | | |
| pnpm install | |
| sudo apt-get install -y jq | |
| - name: Test | |
| run: | | |
| curl -L -o openapi.yaml "$(curl -s https://api.github.com/repos/vrchatapi/specification/releases \ | |
| | jq -r '.[] | select(.prerelease) | .assets[] | select(.name=="openapi-internal+legacy.yaml").browser_download_url' \ | |
| | head -n 1)" | |
| rm data/state -rf | |
| ./node_modules/.bin/ava reset-cache | |
| ./node_modules/.bin/ava --serial | |
| env: | |
| VRCHAT_EMAIL: ${{ secrets.VRCHAT_EMAIL }} | |
| VRCHAT_USERNAME: ${{ secrets.VRCHAT_USERNAME }} | |
| VRCHAT_PASSWORD: ${{ secrets.VRCHAT_PASSWORD }} | |
| VRCHAT_TOTP_SECRET: ${{ secrets.VRCHAT_TOTP_SECRET }} | |
| VRCHAT_FRIEND_ID: ${{ secrets.VRCHAT_FRIEND_ID }} | |
| VRCHAT_GROUP_ID: ${{ secrets.VRCHAT_GROUP_ID }} | |
| - name: Push changes | |
| continue-on-error: true | |
| if: always() | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . -A | |
| git commit -m "ci(test: $(date -I)): new changes" | |
| git push |