build(deps): bump debug from 4.3.7 to 4.4.0 #1482
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: Continuous integration | |
on: | |
pull_request: | |
branches: | |
- '**' | |
push: | |
branches: [main] | |
tags: | |
- '**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['lts/*'] | |
steps: | |
- name: Install imagemagick and rsvg-convert | |
run: sudo apt-get install -y imagemagick librsvg2-bin | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: npm install, lint and build | |
run: | | |
npm ci | |
npm run lint:ci | |
npm run build | |
# Note: we cannot set the command via github actions service containers | |
# but minio image requires it. We thus rely on docker-compose. | |
- name: Run minio for testing s3 | |
run: docker compose -f docker-compose-minio.yml up -d | |
- name: Run the unit tests, as well as tests against minio | |
run: npm run test:ci | |
- name: Ensure docker-compose stopped | |
run: docker compose -f docker-compose-minio.yml stop || true | |
if: always() | |
- name: Send coverage to codacy | |
# secrets are not available for PR from forks, and dependabot PRs | |
if: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }} | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: reports/coverage/lcov.info | |
publish: | |
# only publish if tests passed | |
needs: test | |
# only publish images for tags and main branch | |
if: "contains(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: c2corg/c2c_images | |
tags: | | |
type=ref,event=tag,priority=610 | |
type=ref,event=branch,priority=600 | |
- name: Publish the docker image | |
uses: docker/build-push-action@v6 | |
with: | |
load: false | |
push: true | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
build-args: VERSION=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.version'] }} | |
create-release: | |
needs: test | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create or update release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
token: ${{ secrets.GITHUB_TOKEN }} |