diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4150d8c..9caaaa2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/Dockerfile b/Dockerfile index 2e8e989..a3229b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/