Skip to content

Allow all "the" variants in artist #132

Allow all "the" variants in artist

Allow all "the" variants in artist #132

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ "master" ]
paths:
- 'server/**'
pull_request:
branches: [ "master" ]
paths:
- 'server/**'
env:
ARTIFACT_NODE_VER: 16.x
defaults:
run:
working-directory: server
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
name: Node ${{ matrix.node-version }} build & test
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './server/package-lock.json'
- run: npm ci
- name: Run ESLint
run: npm run lint
- run: npm run build --if-present
- name: Run tests
run: npm test
- name: Archive build
uses: actions/upload-artifact@v3
if: ${{ matrix.node-version == env.ARTIFACT_NODE_VER }}
with:
name: dist
path: |
server/bin
- name: Archive code coverage results
uses: actions/upload-artifact@v3
if: ${{ matrix.node-version == env.ARTIFACT_NODE_VER }}
with:
name: code-coverage-report
path: server/coverage/lcov-report
docker:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: dist
path: server/bin
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push (non-master)
if: ${{ github.ref_name != 'master' }}
uses: docker/build-push-action@v3
with:
context: ./server
push: true
tags: 'drp19/trackstar:${{ github.sha }}'
-
name: Build and push to latest
if: ${{ github.ref_name == 'master' }}
uses: docker/build-push-action@v3
with:
context: ./server
push: true
tags: |
- 'drp19/trackstar:latest'
- 'drp19/trackstar:${{ github.sha }}'