Commerce: /checkout #26
This file contains 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.js CI | |
on: | |
push: | |
branches: [main, github-actions] | |
pull_request: | |
branches: [main] | |
env: | |
HOSTNAME: ${{ secrets.HOSTNAME }} | |
JWT_SECRET: testing.jwt.secret | |
MONGODB_CONNECTION_STRING: mongodb://mongoadmin:secret@localhost:27017/sclservertest?authSource=admin | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
mongodb-version: ['4.2', '4.4', '5.0', '6.0', '7.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
mongodb-username: mongoadmin | |
mongodb-password: secret | |
mongodb-db: sclservertest | |
- run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://[email protected]/ | |
# - name: Yarn install cache | |
# uses: c-hive/gha-yarn-cache@v1 | |
- name: Install Dependencies | |
run: yarn install | |
- name: Test | |
run: yarn test |