chore: update changelog and version #35
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: "Unit Tests" | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - labeled | |
| - unlabeled | |
| push: | |
| branches: | |
| - "[0-9]+.[0-9]+" | |
| # Only one instance of this workflow will run on the same ref (PR/Branch/Tag) | |
| # Previous runs will be cancelled. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| define-versions: | |
| if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests') | |
| runs-on: ubuntu-latest | |
| outputs: | |
| fdiVersions: ${{ steps.versions.outputs.fdiVersions }} | |
| cdiVersions: ${{ steps.versions.outputs.cdiVersions }} | |
| nodeVersions: '["18.20", "20.19", "22.14"]' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: supertokens/get-supported-versions-action@main | |
| id: versions | |
| with: | |
| has-fdi: true | |
| has-cdi: true | |
| test: | |
| if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests') | |
| runs-on: ubuntu-latest | |
| needs: define-versions | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ${{ fromJSON(needs.define-versions.outputs.nodeVersions) }} | |
| cdi-version: ${{ fromJSON(needs.define-versions.outputs.cdiVersions) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: supertokens/get-versions-action@main | |
| id: versions | |
| with: | |
| driver-name: node | |
| cdi-version: ${{ matrix.cdi-version }} | |
| env: | |
| SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: | | |
| npm install | |
| - name: Run unit tests | |
| run: | | |
| docker compose up --wait | |
| npm run test | |
| docker compose down | |
| env: | |
| SUPERTOKENS_CORE_VERSION: ${{ steps.versions.outputs.coreVersionXy }} |