Skip to content

CI

CI #822

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
docker-compose:
name: docker-compose (production container)
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: docker build / start
run: docker-compose -f docker-compose.ci.yml up -d
- name: wait for nginx
run: while ! nc -z localhost 443; do sleep 0.1; done
- name: ping
run: curl --insecure https://localhost/ping -vvv
- name: openapi
run: curl --insecure https://localhost/openapi -vvv
- name: docker stop
run: docker-compose -f docker-compose.ci.yml stop
docker:
name: docker (development container)
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: docker build
run: docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -u) -f docker/development/node/Dockerfile . -t node
- name: npm install
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm install'
- name: npm run cs
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run cs'
- name: npm run lint
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run lint'
- name: npm run test -- --coverage --no-cache
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run test -- --coverage --no-cache'
- name: npm run test:integration --no-cache
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run test:integration --no-cache'
- name: npm run infection
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run infection'
- name: npm run build
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && npm run build'
node16:
name: Node 16
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: checkout node
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- run: npm run test
node18:
name: Node 18
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: checkout node
uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm install
- run: npm run cs
- run: npm run lint
- run: npm run test -- --coverage --no-cache
- run: npm run test:integration --no-cache
- run: npm run infection
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
- run: npm run build
- name: coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: sonarcloud.io
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
node20:
name: Node 20
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: checkout node
uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm install
- run: npm run test