LBINFRA-52/improve-ci #19
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
name: Continuous Integration | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
Lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out Source Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 12 | |
- name: Clean Install Project | |
run: npm ci | |
- name: Install ESLint | |
run: npm install -g eslint | |
- name: Lint with ESLint | |
uses: stefanoeb/[email protected] | |
Build: | |
runs-on: ubuntu-20.04 | |
needs: Test | |
steps: | |
- name: Check out Source Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 12 | |
- name: Clean Install Project | |
run: npm ci | |
- name: Build | |
run: npm run build | |
Test: | |
runs-on: ubuntu-20.04 | |
needs: Lint | |
steps: | |
- name: Check out Source Repository | |
uses: actions/checkout@v4 | |
- name: Get Modified JavaScript Files | |
id: changed-javascript-files | |
uses: tj-actions/changed-files@v44 | |
- name: Setup Node.js | |
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js') | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 12 | |
- name: Clean Install Project | |
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js') | |
run: npm ci | |
- name: Test | |
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js') | |
run: npm test |