Skip to content

Commit

Permalink
Rejig lint to build package to mypy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
illusional committed Sep 15, 2023
1 parent b3accdf commit 583784b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,51 @@ 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@v2
- uses: actions/checkout@main

- uses: actions/setup-python@v2
with:
python-version: "3.10"
cache: "pip"

- name: Install packages
- uses: actions/setup-java@v2
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "17"

- name: Setup build env
run: |
set -euxo pipefail
pip install -r requirements-dev.txt
pip install -r requirements.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: "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 -r requirements-dev.txt
pip install .
# test to see if this is happier
mkdir .mypy_cache
- name: pre-commit
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ pre-commit
pylint
testcontainers[mariadb]
types-PyMySQL
# some strawberry dependency
rich

0 comments on commit 583784b

Please sign in to comment.