2022-03-26 15:48:34 +01:00
|
|
|
name: Javascript CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-03-26 16:10:21 +01:00
|
|
|
paths: ['fittrackee_client/**']
|
2022-03-26 15:48:34 +01:00
|
|
|
pull_request:
|
2022-03-26 16:10:21 +01:00
|
|
|
paths: ['fittrackee_client/**']
|
2023-10-04 10:38:22 +02:00
|
|
|
types: [opened, synchronize, reopened]
|
2022-03-26 15:48:34 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
working-directory: fittrackee_client
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
javascript:
|
2023-10-04 10:38:22 +02:00
|
|
|
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
|
2022-03-26 15:48:34 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-29 18:29:29 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-11-11 14:32:55 +01:00
|
|
|
- name: Use Node.js 18.x
|
2023-07-29 18:29:29 +02:00
|
|
|
uses: actions/setup-node@v3
|
2022-03-26 15:48:34 +01:00
|
|
|
with:
|
2023-11-11 14:32:55 +01:00
|
|
|
node-version: "18.x"
|
2022-03-26 15:48:34 +01:00
|
|
|
- name: Install yarn and dependencies
|
|
|
|
working-directory: ${{env.working-directory}}
|
|
|
|
run: |
|
|
|
|
npm install --global yarn
|
|
|
|
yarn install
|
|
|
|
- name: Lint
|
|
|
|
working-directory: ${{env.working-directory}}
|
|
|
|
run: yarn lint
|
2023-11-11 20:16:18 +01:00
|
|
|
- name: Type check
|
|
|
|
working-directory: ${{env.working-directory}}
|
|
|
|
run: yarn type-check
|
2022-03-26 15:48:34 +01:00
|
|
|
- name: Tests
|
|
|
|
working-directory: ${{env.working-directory}}
|
|
|
|
run: yarn test:unit
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{env.working-directory}}
|
|
|
|
run: yarn build
|