chore: update tests and tooling #1914
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
| name: Node CI | |
| on: | |
| push: | |
| branches: [master, beta] | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: [master, beta] | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| jobs: | |
| test_no_xsel: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pnpm | |
| uses: jdx/mise-action@v2 | |
| with: | |
| tools: pnpm | |
| - name: pnpm install, build, and test | |
| run: | | |
| pnpm install | |
| pnpm run build --if-present | |
| pnpm run test | |
| env: | |
| CI: true | |
| NODE_ENV: test | |
| # - name: shell test | |
| # run: | | |
| # npm link | |
| # ./__tests__/shell.test.sh | |
| # - name: Setup tmate session | |
| # if: ${{ failure() }} | |
| # uses: mxschmitt/action-tmate@v3 | |
| # timeout-minutes: 5 | |
| # with: | |
| # limit-access-to-actor: true | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| steps: | |
| - name: Install xsel | |
| run: sudo apt-get install xsel xvfb | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pnpm | |
| uses: jdx/mise-action@v2 | |
| with: | |
| tools: pnpm | |
| - name: pnpm install, build, and test | |
| run: | | |
| pnpm install | |
| pnpm run build --if-present | |
| xvfb-run pnpm run test | |
| env: | |
| CI: true | |
| NODE_ENV: test | |
| release: | |
| name: semantic-release | |
| needs: [test, test_no_xsel] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - run: pnpm install | |
| - id: semantic-release | |
| run: pnpm exec semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |