Update docker/build-push-action action to v6.12.0 #223
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint & Test | |
on: | |
workflow_dispatch: # Allow manually running | |
workflow_call: # Allow another workflow to call this one | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- edited | |
- synchronize | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Unit tests & coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: python3 -m pip install -r requirements-dev.txt | |
- name: Black formatter check | |
run: python3 -m black --check --verbose app | |
- name: Run Pytest | |
run: python3 -m pytest --cov app --cov-report html --cov-report term --cov-report xml | |
- name: Upload reports to Codecov | |
uses: codecov/codecov-action@v4-beta | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Required for v4 | |
with: | |
fail_ci_if_error: true | |
files: coverage.xml | |
docker_integation_tests: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and export Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
load: true # Do not push this image | |
tags: minituff/add-header-action | |
- name: Run integration tests against Docker image | |
run: docker compose run add-header-action |