diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 010d692..aaf3718 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..224947d --- /dev/null +++ b/.github/workflows/pr.yml @@ -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 diff --git a/package.json b/package.json index 1ccc125..3fb6057 100644 --- a/package.json +++ b/package.json @@ -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,