chore(deps): update actions/checkout action to v6 (#129) #126
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: verify | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/verify.yml" | |
| - "libs/**" | |
| - "tests/**" | |
| - "test_libs.py" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - run: echo "export PYTHONPATH=$(pwd)" >> $GITHUB_ENV # 追加 | |
| - name: Set up competitive-verifier | |
| uses: competitive-verifier/actions/setup@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| cache-pip: true | |
| - name: python unittest | |
| id: python-unittest | |
| continue-on-error: true | |
| run: | | |
| python -m pip install git+https://github.com/not522/ac-library-python | |
| python test_libs.py | |
| - name: oj-resolve | |
| uses: competitive-verifier/actions/oj-resolve@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| output-path: verify_files.json | |
| include: | | |
| libs/ | |
| tests/ | |
| test_libs.py | |
| exclude: | | |
| .github/ | |
| code/ | |
| env: | |
| PYTHON_UNITTEST_RESULT: ${{ steps.python-unittest.outcome == 'success' }} | |
| - name: Upload verify_files.json | |
| uses: competitive-verifier/actions/upload-verify-artifact@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| file: verify_files.json | |
| - name: Check bundled | |
| id: test-bundled | |
| run: | | |
| echo "count=$(find .competitive-verifier/bundled/ -type f | wc -l)" >> $GITHUB_OUTPUT | |
| - name: Upload bundled | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| if: steps.test-bundled.outputs.count > 0 | |
| with: | |
| name: Bundled-${{ runner.os }} | |
| path: .competitive-verifier/bundled | |
| retention-days: 1 | |
| verify: | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| env: | |
| SPLIT_SIZE: "20" | |
| strategy: | |
| matrix: | |
| index: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - run: echo "export PYTHONPATH=$(pwd)" >> $GITHUB_ENV # 追加 | |
| - name: Download verify_files.json | |
| uses: competitive-verifier/actions/download-verify-artifact@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| - name: Set up competitive-verifier | |
| uses: competitive-verifier/actions/setup@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| cache-pip: true | |
| - name: Verify | |
| uses: competitive-verifier/actions/verify@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| destination: ${{runner.temp}}/result.json | |
| split-size: ${{ env.SPLIT_SIZE }} | |
| split-index: ${{ matrix.index }} | |
| timeout: 1800 | |
| env: | |
| YUKICODER_TOKEN: ${{secrets.YUKICODER_TOKEN}} | |
| - name: Upload result artifact | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: Result-${{ runner.os }}-${{ matrix.index }} | |
| path: ${{runner.temp}}/result.json | |
| retention-days: 1 | |
| docs-and-check: | |
| runs-on: ubuntu-latest | |
| needs: [verify] | |
| outputs: | |
| upload-pages: ${{steps.upload-pages.outcome == 'success'}} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 2147483647 | |
| - run: echo "export PYTHONPATH=$(pwd)" >> $GITHUB_ENV # 追加 | |
| - name: Download verify_files.json and all artifacts | |
| id: all-artifacts | |
| uses: competitive-verifier/actions/download-verify-artifact@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| download-all: true | |
| artifact-root: .artifacts/ | |
| - name: Extract bundled | |
| shell: bash | |
| run: | | |
| rm -rf .competitive-verifier/bundled | |
| if test -d "$SRCDIR"; then | |
| mkdir -p .competitive-verifier/ | |
| mv "$SRCDIR" .competitive-verifier/bundled | |
| else | |
| echo "$SRCDIR does not exist." | |
| fi | |
| env: | |
| SRCDIR: .artifacts/Bundled-${{ runner.os }} | |
| - name: Set up competitive-verifier | |
| uses: competitive-verifier/actions/setup@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| cache-pip: true | |
| - name: Docs | |
| uses: competitive-verifier/actions/docs@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| verify-result: ${{ steps.all-artifacts.outputs.artifacts-root }}/Result-*/result.json | |
| destination: _jekyll | |
| write-summary: true | |
| - name: Setup Pages | |
| uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
| - name: Build with Jekyll | |
| uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 # v1.0.13 | |
| with: | |
| source: _jekyll | |
| destination: _site | |
| - name: Upload artifact | |
| id: upload-pages | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: _site | |
| - name: Check | |
| uses: competitive-verifier/actions/check@af681adfd1e9bd6588e56e1a83c5ca78087fb872 # v2.0.4 | |
| with: | |
| verify-result: ${{ steps.all-artifacts.outputs.artifacts-root }}/Result-*/result.json | |
| deploy: | |
| if: (success() || failure()) && github.ref == 'refs/heads/main' && needs.docs-and-check.outputs.upload-pages == 'true' | |
| needs: docs-and-check | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |