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 43ed8a5
Showing 1 changed file with 11 additions and 24 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

0 comments on commit 43ed8a5

Please sign in to comment.