[pull] master from Ezard:master #168
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: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
node-version: | |
- 18 | |
name: CI | |
steps: | |
- name: Configure Git | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup dependency cache | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: functions/node_modules | |
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('functions/package-lock.json') }} | |
- name: Install dependencies | |
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | |
run: npm ci | |
working-directory: functions | |
- name: Lint code | |
run: npm run lint:code | |
working-directory: functions | |
- name: Lint styling | |
run: npm run lint:style | |
working-directory: functions | |
- name: Run unit tests | |
run: npm run test:unit:coverage | |
working-directory: functions |