Skip to content

[NO-3883] add account ownerships to PATCH /analyses/:id body #85

[NO-3883] add account ownerships to PATCH /analyses/:id body

[NO-3883] add account ownerships to PATCH /analyses/:id body #85

name: Run Build and tests
on:
pull_request:
push:
branches-ignore:
- dependabot/**
- gh-pages
workflow_dispatch:
inputs:
ref:
description: |
The branch, tag or SHA to checkout. When checking out the repository that
triggered a workflow, this defaults to the reference or SHA for that event.
Otherwise, uses the default branch.
required: false
default: master
env:
NODE_ENV: test
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
# Setup the node environment
- name: Use Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- run: npm i -g @nestjs/cli
# Install dependencies
- run: npm ci --prefer-offline
# Build application
- run: npm run build
# Run lint
- run: npm run lint
# Run unit tests
- run: npm run test
# Run functional tests with coverage
- run: npm run test:cov
publish:
runs-on: ubuntu-latest
needs:
- test
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' }}
steps:
# Checkout the repository
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}
# Setup the node environment
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 14
# Install dependencies
- run: npm ci --prefer-offline
- run: npx semantic-release
env:
DOCKER_REGISTRY_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_GHA_PAT }}