CI #1266
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: 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@v4 | |
- 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@v4 | |
- 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: pnpm install | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm install' | |
- name: pnpm run cs | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run cs' | |
- name: pnpm run lint | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run lint' | |
- name: pnpm run test --run --coverage --no-cache | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run test --run --coverage --no-cache' | |
- name: pnpm run test:integration --run --no-cache | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run test:integration --run --no-cache' | |
- name: pnpm run infection | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run infection' | |
- name: pnpm run build | |
run: docker container run -v ${GITHUB_WORKSPACE}:/app node /bin/bash -c 'source ~/.bashrc && pnpm run build' | |
node18: | |
name: Node 18 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: checkout node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: corepack enable pnpm | |
- run: pnpm install | |
- run: pnpm run test --run | |
node20: | |
name: Node 20 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: checkout node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- run: corepack enable pnpm | |
- run: pnpm install | |
- run: pnpm run cs | |
- run: pnpm run lint | |
- run: pnpm run test --run --coverage --no-cache | |
- run: pnpm run test:integration --run --no-cache | |
- run: pnpm run infection | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
- run: pnpm run build | |
- name: coveralls.io | |
uses: coverallsapp/github-action@main | |
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 }} |