Skip to content

Commit

Permalink
Upgrade CI/CD.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 committed Aug 29, 2024
1 parent 2a73927 commit 6aabe94
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 169 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/auth-web-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,26 @@ on:
push:
branches:
- main
paths:
- "auth-web/**"
- feature*
workflow_dispatch:
inputs:
environment:
description: "Environment"
target:
description: "Deploy To"
required: true
type: choice
options:
- dev
- test
- sandbox
- prod
tagname:
description: "Specify a previous version (git tag) to deploy"
required: false
default: ""

jobs:
account-ui-cd:
uses: bcgov/bcregistry-sre/.github/workflows/ui-cd-node20.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/backend-cd.yaml@main
with:
environment: ${{ inputs.environment }}
tagname: ${{ inputs.tagname }}
target: ${{ inputs.target }}
app_name: "account-ui"
working_directory: "./auth-web"
secrets:
APP_NAME: "account-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 }}
78 changes: 9 additions & 69 deletions .github/workflows/auth-web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,21 @@ on:
pull_request:
branches:
- main
- feature-business-registry-dashboard-updates
- feature*
paths:
- "auth-web/**"
workflow_dispatch:

defaults:
run:
shell: bash
working-directory: ./auth-web

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

if: github.repository == 'bcgov/sbc-auth'

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

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

strategy:
matrix:
node-version: [20.5.1]

steps:
- uses: actions/checkout@v4
- 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@v4
- 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 Vitest
id: test
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: authweb
name: codecov-auth-web
fail_ci_if_error: false

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

steps:
- uses: actions/checkout@v4
- name: build to check strictness
id: build
run: |
make build-nc
account-ui-ci:
uses: bcgov/bcregistry-sre/.github/workflows/frontend-ci.yaml@main
with:
node_version: "20.5.1"
app_name: "account-ui"
working_directory: "./auth-web"
codecov_flag: "authweb"
2 changes: 1 addition & 1 deletion auth-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ VUE_APP_KEYCLOAK_CLIENTID="account-web"
VUE_APP_SENTRY_DSN=

#vaults hotjar
VUE_APP_HOTJAR_ID=
VUE_APP_HOTJAR_ID=
1 change: 1 addition & 0 deletions auth-web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ __mock__

.env
.env.bak
!.env.example
*.firebaserc
.firebase
85 changes: 0 additions & 85 deletions auth-web/Makefile

This file was deleted.

2 changes: 2 additions & 0 deletions auth-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"build-check": "vite build",
"preview": "vite preview --port 8080",
"lint": "eslint . --ext ts,vue --fix src",
"lint:nofix": "eslint . --ext ts,vue --no-fix",
"test": "vitest run",
"test:unit": "vitest run",
"test:watch": "vitest watch",
"test:coverage": "vitest run --coverage"
Expand Down

0 comments on commit 6aabe94

Please sign in to comment.