Skip to content

Bump express from 4.17.1 to 4.19.2 in /api #130

Bump express from 4.17.1 to 4.19.2 in /api

Bump express from 4.17.1 to 4.19.2 in /api #130

Workflow file for this run

name: API Test & Build
on:
push:
paths:
- 'api/src/**/*.js'
- 'api/package*.json'
- 'api/templates/*.html'
workflow_dispatch:
defaults:
run:
working-directory: ./api
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Unit tests w/ coverage
run: npm run test:coverage
- name: LINTing
run: npm run test:lint
# - name: OpenAPI Schema
# run: npm run test:schema
# - name: Upload coverage report
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.TestReporterID }}
# CI: "true"
# run: |
# curl -Ls https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
# chmod +x ./cc-test-reporter
# ./cc-test-reporter format-coverage -t lcov -o codeclimate.json
# ./cc-test-reporter upload-coverage -i codeclimate.json
build:
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: npm install and build
run: |
npm ci
npm run build --if-present
env:
CI: 'true'
s2i-build:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test, build]
steps:
- name: S2I Build
uses: redhat-developer/openshift-actions@v1.1
with:
version: 'latest'
openshift_server_url: ${{ secrets.OpenShiftServerURL}}
parameters: '{"apitoken": "${{ secrets.OpenShiftToken }}", "acceptUntrustedCerts": "true"}'
cmd: |
'version'
'start-build secure-image-api-master-build -F -n ${{ secrets.OPENSHIFT_PROJECT }}-tools'
'tag ${{ secrets.OPENSHIFT_PROJECT }}-tools/secure-image-api:latest ${{ secrets.OPENSHIFT_PROJECT }}-tools/secure-image-api:dev -n ${{ secrets.OPENSHIFT_PROJECT }}-tools'