Test #4
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 | |
| # newer commits in the same PR abort running ones for the same workflow | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
| required: false | |
| default: false | |
| env: | |
| PGDATABASE: smc | |
| PGUSER: smc | |
| PGHOST: localhost | |
| COCALC_MODE: "single-user" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| node-version: | |
| - "24" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install python3 requests for checking doc links | |
| run: sudo apt-get update && sudo apt-get install -y python3-requests | |
| - name: Install btrfs-progs for @cocalc/file-server | |
| run: sudo apt-get update && sudo apt-get install -y btrfs-progs | |
| - name: Set up Python venv and Jupyter kernel | |
| run: | | |
| python3 -m pip install --upgrade pip virtualenv | |
| python3 -m virtualenv venv | |
| source venv/bin/activate | |
| pip install ipykernel | |
| python -m ipykernel install --prefix=./jupyter-local --name python3-local --display-name "Python 3 (Local)" | |
| - name: install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: build | |
| run: cd src && pnpm run make | |
| # This runs all the tests with text output and jest-junit reporters to generate junit.xml reports | |
| # That test-github-ci target runs workspaces.py for testing, which in turn runs the depchecks | |
| - name: test | |
| run: source venv/bin/activate && cd src && pnpm run test-github-ci --report | |
| - name: upload test results | |
| uses: actions/upload-artifact@v4 # upload test results | |
| if: ${{ !cancelled() }} # run this step even if previous step failed | |
| with: | |
| name: "test-results-node-${{ matrix.node-version }}" | |
| path: 'src/packages/*/junit.xml' |