Skip to content

Commit

Permalink
Trying to fix CI through docker
Browse files Browse the repository at this point in the history
  • Loading branch information
leoisl committed Jul 18, 2023
1 parent 4a72d42 commit 8e99838
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 32 deletions.
43 changes: 12 additions & 31 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
name: Python CI
name: Docker CI

on: [ push, pull_request ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
os: [ ubuntu-latest ]
defaults:
run:
shell: bash -el {0}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.2
- name: Install project
run: just install-ci
- name: Check formatting
run: just check-fmt
- name: Lint
run: just lint
- name: Test
run: just test -vv
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Build Docker Image
uses: docker/build-push-action@v2
with:
file: ./coverage.xml
fail_ci_if_error: false
env_vars: OS,PYTHON
context: .
push: false
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ COPY . /make_prg

RUN poetry run pip install -U pip \
&& poetry install --no-ansi --only main --all-extras \
&& make_prg --version
&& make_prg --version && pytest tests

# workaround required for pyinstaller to work
RUN cp -vr /usr/bin/* /usr/sbin/
Expand Down

0 comments on commit 8e99838

Please sign in to comment.