Skip to content

Commit

Permalink
Run mypy in CI inside docker container (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe authored Dec 16, 2021
1 parent f67510d commit 24249a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,23 @@ jobs:
static-typing:
name: Static Typing
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('reqs/*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: MyPy cache
uses: actions/cache@v2
with:
path: .mypy_cache
key: ${{ runner.os }}-mypy
restore-keys: |
${{ runner.os }}-mypy
- name: Fix permission issue on .mypy_cache
run: |
mkdir -p .mypy_cache
chmod -R 777 .mypy_cache
- name: Run MyPy
run: |
make sync-local-requirements
mypy --config-file pyproject.toml
IMAGE_TAG=${{ env.CI_TAG }} docker-compose -f docker-compose.ci.yml run sut mypy --config-file pyproject.toml
test:
name: Test
Expand Down
1 change: 1 addition & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ services:
COVERAGE_RCFILE: /app/setup.cfg
volumes:
- ./coverage:/app/coverage
- ./.mypy_cache:/app/.mypy_cache

0 comments on commit 24249a3

Please sign in to comment.