Skip to content

Commit

Permalink
Merge pull request #2 from bcgov/1584
Browse files Browse the repository at this point in the history
1584
  • Loading branch information
saranyaviswam authored Sep 13, 2024
2 parents 286799a + 377101d commit 607a373
Show file tree
Hide file tree
Showing 11 changed files with 1,396 additions and 844 deletions.
38 changes: 22 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
// temporarily convert some errors to ignore
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off",
"no-case-declarations": "off",
},
};
43 changes: 42 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy
name: Build, Lint, Test, and Deploy

on:
push:
Expand All @@ -12,8 +12,49 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

test_e2e:
runs-on: ubuntu-latest
needs: lint

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Run E2E tests
run: npm run test:e2e

build_and_push:
runs-on: ubuntu-latest
needs: test_e2e

steps:
- name: Checkout the repository
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dist
dist-ssr
*.local

playwright-report
test-results

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
Loading

0 comments on commit 607a373

Please sign in to comment.