-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (73 loc) · 2.01 KB
/
ci-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI Check
on:
push:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
- name: Run Prettier Check
run: npm run format:check
- name: Run Linter
run: npm run lint
- name: Run Type Check
run: npm run type-check
- name: Run Unit Tests
run: npm run test
frontend-tests:
runs-on: ubuntu-latest
concurrency: cypress-tests
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
- name: Cypress Test
run: npm run cypress:e2e
env:
SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CORNELLDTI_COURSEPLAN_DEV }}
- name: Upload recordings if tests fail
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: recorded-videos
path: cypress/videos/
python-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pip
run: |
export RUN_LANGCHAIN_TESTS=false
python -m pip install --upgrade pip setuptools wheel
- name: Install pipenv, black, and pytest
run: |
pip install pipenv
- name: Pipenv Install
working-directory: python
run: pipenv install
- name: Check that pipenv is up to date
run: |
exit $(git status --porcelain | wc -l)
- name: Run black linting
working-directory: python
run: pipenv run black . --check
- name: Run black and tests
working-directory: python
run: pipenv run pytest