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 ddf54b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
35 changes: 11 additions & 24 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,25 +10,24 @@ 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
Expand All @@ -44,15 +43,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 ddf54b2

Please sign in to comment.