[angular-ngrx-scss] pulls tab #330
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Angular NgRx SCSS CI | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "angular-ngrx-scss/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- "angular-ngrx-scss/**" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: angular-ngrx-scss/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
working-directory: angular-ngrx-scss | |
- name: Lint files | |
run: npm run lint | |
working-directory: angular-ngrx-scss | |
format-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: angular-ngrx-scss/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
working-directory: angular-ngrx-scss | |
- name: Check formatting | |
run: npm run format:check | |
working-directory: angular-ngrx-scss | |
build: | |
runs-on: ubuntu-latest | |
needs: [lint, format-check] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: angular-ngrx-scss/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
working-directory: angular-ngrx-scss | |
- name: Build Project | |
run: npm run build | |
working-directory: angular-ngrx-scss | |
test: | |
runs-on: ubuntu-latest | |
needs: [lint, format-check] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: angular-ngrx-scss/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
working-directory: angular-ngrx-scss | |
- name: Test Project | |
run: npm run test:ci | |
working-directory: angular-ngrx-scss |