Skip to content

Commit

Permalink
🌱 workflow to use same container as Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Mar 28, 2024
1 parent f6d2812 commit e998619
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 26 deletions.
39 changes: 14 additions & 25 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI (repo level)
name: CI (repo level) with Dockerfile build container

on:
push:
Expand All @@ -10,31 +10,32 @@ on:
- "main"
- "release-*"

env:
# Note: This should match the node version(s) used in the base Dockerfile
node-version: "18"

jobs:
unit-test:
runs-on: ubuntu-latest

# Use the same container as the Dockerfile's "FROM * as builder"
container: registry.access.redhat.com/ubi9/nodejs-18:latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js (version "${{ env.node-version }}")
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "npm"
# - name: Use Node.js (version "${{ env.node-version }}")
# uses: actions/setup-node@v4
# with:
# node-version: ${{ env.node-version }}
# cache: "npm"

- name: Force install npm@9 to match Dockerfile build container ubi9/nodejs-18:1-88
run: npm install -g npm@9
# - name: Force install npm@9 to match Dockerfile build container ubi9/nodejs-18:1-88
# run: npm install -g npm@9

- name: Verify package-lock.json
run: ./scripts/verify_lock.mjs

- name: Install
run: npm clean-install --ignore-scripts
run: |
npm version
npm clean-install --ignore-scripts
- name: Lint sources
run: npm run lint
Expand All @@ -44,15 +45,3 @@ jobs:

- name: Test
run: npm run test -- --coverage --watchAll=false

- name: Upload to codecov (client)
uses: codecov/codecov-action@v4
with:
flags: client
directory: ./*/coverage

- name: Upload to codecov (server)
uses: codecov/codecov-action@v4
with:
flags: server
directory: ./*/coverage
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"engines": {
"node": ">=18.14.2",
"npm": "^9.5.0"
"npm": ">=9.5.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
Expand Down

0 comments on commit e998619

Please sign in to comment.