Skip to content

Commit

Permalink
Run tests on PRs; lint before deployment (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuzina authored Aug 1, 2024
1 parent aa4e3d6 commit 3ea0c53
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: Install Angular dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build Angular
run: npm run build:${{ inputs.environment }}

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR Tests

on:
pull_request:
branches:
- main
- dev

jobs:
build:
name: Build
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install Angular dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build Angular
run: npm run build:dev && rm -rf dist && npm run build:prod
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:dev": "ng build --configuration development",
"build:dev": "npx ng build --configuration development",
"build:prod": "npx ng build --configuration production",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"clean": "rm -rf dist node_modules",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org julie-muzina-a008ebe1f --project jmuzina-portfolio ./dist && sentry-cli sourcemaps upload --org julie-muzina-a008ebe1f --project jmuzina-portfolio ./dist"
},
"private": true,
Expand Down

0 comments on commit 3ea0c53

Please sign in to comment.