Nightly tests #64
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: Nightly tests | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| nightly: | |
| uses: ./.github/workflows/tests.yml | |
| secrets: inherit | |
| nightly-extra: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository code | |
| uses: actions/checkout@v6 | |
| # Setup Python with caching | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: pip install .[dev] | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| - name: Checkout PS | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: smogon/pokemon-showdown | |
| path: pokemon-showdown | |
| submodules: recursive | |
| - name: Get last showdown commit hash | |
| id: showdown-hash | |
| run: | | |
| cd pokemon-showdown/ | |
| export hash=`git log -1 --pretty=format:%H` | |
| echo "hash=$hash" >> $GITHUB_OUTPUT | |
| - name: Restore server cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: pokemon-showdown/node_modules | |
| key: showdown-python${{ matrix.version }}-${{ steps.showdown-hash.outputs.hash }} | |
| restore-keys: showdown-python${{ matrix.version }}- | |
| - name: Install PS dependencies & setup config | |
| run: | | |
| cd pokemon-showdown | |
| npm install | |
| cp config/config-example.js config/config.js | |
| sed -i 's/backdoor = true/backdoor = false/g' config/config.js | |
| sed -i 's/simulatorprocesses = 1/simulatorprocesses = 2/g' config/config.js | |
| sed -i 's/.workers = 1 = 1/.workers = 2/g' config/config.js | |
| - name: Start PS | |
| run: cd pokemon-showdown;node pokemon-showdown start --no-security --max-old-space-size=3000 & | |
| - name: Wait for server to be up | |
| run: | | |
| until $(curl --output /dev/null --silent --head --fail http://localhost:8000); do | |
| sleep .01 | |
| done | |
| sleep 1 | |
| - name: Run nightly-only checks | |
| run: pytest -x strict_integration_tests/ |