-
Notifications
You must be signed in to change notification settings - Fork 31
46 lines (43 loc) · 1.1 KB
/
schema-tests.yml
File metadata and controls
46 lines (43 loc) · 1.1 KB
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
name: Schema Linting and Tests
on:
push:
branches: [ "master", "staging"]
pull_request:
branches: [ "master", "staging" ]
permissions:
contents: read
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run schema linter
run: python ./src/schema_linter.py
- name: Other Tests
run: python -m pytest tests/python
tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tests
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: npm
cache-dependency-path: tests/package-lock.json
- run: npm ci
- run: npm run build --if-present
- run: npm test