Skip to content

Commit

Permalink
updated PPR UI CD pipeline (#2053)
Browse files Browse the repository at this point in the history
* updated PPR UI CD pipeline

* updated ppr-ui-ci

---------

Co-authored-by: flutistar <[email protected]>
  • Loading branch information
flutistar and flutistar authored Nov 1, 2024
1 parent c3460ab commit 46b7f67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 77 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ppr-ui-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "ppr-ui/**"
workflow_dispatch:
inputs:
environment:
target:
description: "Environment"
required: true
type: choice
Expand All @@ -24,12 +24,11 @@ on:

jobs:
ppr-ui-cd:
uses: bcgov/bcregistry-sre/.github/workflows/ui-cd-node20.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/frontend-cd.yaml@main
with:
environment: ${{ inputs.environment }}
tagname: ${{ inputs.tagname }}
target: ${{ inputs.target }}
app_name: "assets-ui"
working_directory: "./ppr-ui"
secrets:
APP_NAME: "assets-ui"
OP_CONNECT_URL: ${{ secrets.OP_CONNECT_URL }}
OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }}
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
76 changes: 6 additions & 70 deletions .github/workflows/ppr-ui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,9 @@ defaults:
working-directory: ./ppr-ui

jobs:
setup-job:
runs-on: ubuntu-20.04

if: github.repository == 'bcgov/ppr'

steps:
- uses: actions/checkout@v3
- run: "true"

linting:
needs: setup-job
runs-on: ubuntu-20.04

strategy:
matrix:
node-version: [20.5.1]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
make setup
- name: Linting
run: |
make lint
testing-coverage:
needs: setup-job
runs-on: ubuntu-20.04

strategy:
matrix:
node-version: [20.5.1]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
make setup
- name: Test with Jest
id: test
run: |
make test
env:
PPR_API_KEY: ${{ secrets.PPR_API_KEY }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: pprui
name: codecov-ppr-ui
fail_ci_if_error: false

build-check:
needs: setup-job
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: build to check strictness
id: build
run: |
make build-nc
ppr-ui-ci:
uses: bcgov/bcregistry-sre/.github/workflows/frontend-ci.yaml@main
with:
app_name: "ppr-ui"
working_directory: "./ppr-ui"
codecov_flag: "pprui"

0 comments on commit 46b7f67

Please sign in to comment.