chore(showdex): merge upstream smogon/damage-calc to 2681f36 #2
Workflow file for this run
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
| # This workflow will do an install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Tests | |
| on: | |
| workflow_run: | |
| workflows: [Update Sets] | |
| types: [completed] | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # this fork is pnpm-only (see packageManager + engines); `pnpm install` runs the root | |
| # postinstall (`subpkg run compile calc`), which compiles the patched calc via tsc. | |
| # we intentionally don't run `pnpm test` -- upstream's jest suite asserts vanilla @smogon/calc | |
| # behavior, which the Showdex damage mods deliberately diverge from, so it can't pass here. | |
| # compilation is the meaningful signal that the fork is intact. | |
| - run: pnpm install | |
| env: | |
| CI: true | |
| publish: | |
| if: ${{ github.repository == 'smogon/damage-calc' && (github.event_name == 'push' || github.event.workflow_run.conclusion == 'success') }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: npm install | |
| - name: Build | |
| run: node build | |
| - name: Upload artifact for GitHub Pages | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: 'dist' | |
| - uses: actions/configure-pages@v5 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |