docs(supported-systems): add note that suse-15 binaries require opens… #1249
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 a clean 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: Node.js CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'gh-pages' | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| git-ref: | |
| description: Git Ref (Optional) | |
| required: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| runs-on: ${{ matrix.distro }} | |
| strategy: | |
| matrix: | |
| # this is a hack as there is currently no (public) way to access "runs-on" with version | |
| distro: [ubuntu-24.04] | |
| node-version: [16.x, 18.x, 20.x, 22.x, 24.x] | |
| steps: | |
| # Install libssl1.1 for libcrypto.so.1.1, which is required for binaries before 22.04 is available (4.0, 4.2, 4.4, 5.0) | |
| # currently 5.0 is still in LTS | |
| - name: Load libssl chache | |
| # cache the package so that we dont need to hit the debian server so often | |
| id: cache-libssl | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/ssl | |
| key: libssl1.1 | |
| - name: install libssl1.1 | |
| # ubuntu seemingly does not have that package anymore, but the one from debian still works | |
| run: | | |
| mkdir -p ~/ssl && cd ~/ssl | |
| wget -nc https://ftp.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_amd64.deb | |
| sudo dpkg -i libssl1.1_1.1.1w-0+deb11u1_amd64.deb | |
| # end libssl1.1 install | |
| - uses: actions/checkout@v5 | |
| if: github.event.inputs.git-ref == '' | |
| with: | |
| fetch-depth: 0 # always fetch everything to be sure for codecov | |
| - uses: actions/checkout@v5 | |
| if: github.event.inputs.git-ref != '' | |
| with: | |
| ref: ${{ github.event.inputs.git-ref }} | |
| fetch-depth: 5 # because this is an manual trigger, only fetch the latest 5 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Load MongoDB binary cache | |
| id: cache-mongodb-binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/mongodb-binaries | |
| key: ${{ matrix.distro }}-${{ hashFiles('**/globalSetup.ts') }} | |
| restore-keys: | | |
| ${{ matrix.distro }}- | |
| ${{ matrix.distro }} | |
| - name: Install node_modules | |
| run: yarn | |
| - name: TSCheck | |
| run: yarn --cwd packages/mongodb-memory-server-core run tscheck | |
| - name: ESLint | |
| run: yarn run lint | |
| - name: Tests | |
| run: yarn --cwd packages/mongodb-memory-server-core run coverage --colors | |
| env: | |
| CI: true | |
| - name: Send codecov.io stats | |
| if: matrix.node-version == '16.x' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| publish: | |
| permissions: | |
| contents: write # for actions/checkout to fetch code and for semantic-release to push commits, release releases and tags | |
| issues: write # for semantic-release to comment on and close issues | |
| pull-requests: write # for semantic-release to comment on and close pull requests | |
| id-token: write # for semantic-release to enable use of OIDC for npm provenance | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta' || startsWith(github.ref, 'refs/heads/old') | |
| needs: [tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - name: Install node_modules | |
| run: yarn install | |
| - name: Build | |
| run: yarn build | |
| - name: Semantic Release | |
| uses: cycjimmy/semantic-release-action@ba330626c4750c19d8299de843f05c7aa5574f62 # v5.0.2 | |
| with: | |
| # dry_run: true | |
| # "conventional-changelog-writer" is exactly installed as "cycjimmy/semantic-release-action" depends on 8.0.0, which causes errors | |
| # plugins included in semantic-release by default: | |
| # @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/npm @semantic-release/github | |
| extra_plugins: | | |
| @semantic-release/[email protected] | |
| @semantic-release/[email protected] | |
| conventional-changelog-conventionalcommits@8 | |
| [email protected] | |
| [email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # replace with trusted-publishing once available, see https://github.com/semantic-release/npm/issues/958 | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |