-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 1.71 KB
/
lint.yaml
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
name: Lint
on: push
jobs:
lint:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
# used for generating API
SM_DOCKER: samplemetadata:dev
defaults:
run:
shell: bash -eo pipefail -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Setup build env
run: |
set -euxo pipefail
pip install --no-deps -r requirements-dev.txt
# openapi-generator
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.0/openapi-generator-cli-5.3.0.jar -O openapi-generator-cli.jar
- name: 'install frontend deps'
working-directory: ./web
run: npm ci
- name: 'check frontend formatting'
working-directory: ./web
run: npm run format:check
- name: 'check frontend linting'
working-directory: ./web
run: npm run lint
- name: 'build image'
run: |
docker build \
--build-arg SM_ENVIRONMENT=local \
--tag $SM_DOCKER \
-f deploy/api/Dockerfile \
.
- name: Build + install packages
run: |
export OPENAPI_COMMAND="java -jar openapi-generator-cli.jar"
python regenerate_api.py
pip install --no-deps -r requirements-dev.txt
pip install .
mkdir .mypy_cache
- name: pre-commit
run: pre-commit run --all-files