Skip to content

Graphql setup

Graphql setup #43

Workflow file for this run

# This workflow will do a clean installation of node dependencies
# build the source code and run tests across different versions of node and MongoDB
name: Node.js CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
mongodb-version: ["4.2", "4.4", "5.0", "6.0"]
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-port: 27017
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
env:
TRAFIKVERKET_API_KEY: ${{ secrets.TRAFIKVERKET_API_KEY }}
MONGO_URI_TEST: mongodb://localhost:27017