Skip to content

chore: monthly github dependabot (#97) #3

chore: monthly github dependabot (#97)

chore: monthly github dependabot (#97) #3

Workflow file for this run

# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Express Boilerplate Main Workflow
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: cp .env.dist .env
- run: cp docker-compose.override.yml.dist docker-compose.override.yml
- run: npm install
- run: npm run docker-build
- run: npm run lint
- run: docker-compose run -d --name js-container js
- run: docker exec js-container npm run services-units-coverage
- run: docker exec js-container npm run integration-tests-coverage
- run: docker cp js-container:/coverage .
- run: docker-compose stop js
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
sonarqube-analysis:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage/
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}