twenty/.github/workflows/ci.yaml
2023-04-20 11:51:04 +02:00

31 lines
959 B
YAML

name: continous-integration
on:
push:
jobs:
front-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "18"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
run: cd front && npm install
- name: Run linter
run: cd front && npm run lint
- name: Run tests and code coverage
run: cd front && npm run coverage-ci