task/WG-232-React-Listing-UI #656
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
Angular-Unit-Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm ci | |
run: | | |
cd angular | |
touch src/environments/jwt.js | |
npm ci | |
- name: Unit Tests | |
run: | | |
cd angular | |
npm run test:ci | |
Angular-Linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm ci | |
run: | | |
cd angular | |
npm ci | |
- name: Linting | |
run: | | |
cd angular | |
npm run lint | |
React-Unit-Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.10.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm ci | |
run: | | |
cd react | |
npm ci | |
- name: Unit Tests | |
run: | | |
cd react | |
cp src/secret_local.example.ts src/secret_local.ts | |
npm run test | |
React-Linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.10.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm ci | |
run: | | |
cd react | |
npm ci | |
- name: Linting | |
run: | | |
cd react | |
npm run lint | |
React-Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.10.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm ci | |
run: | | |
cd react | |
npm ci | |
- name: Build | |
run: | | |
cd react | |
cp src/secret_local.example.ts src/secret_local.ts | |
npm run build |