MM-61359: cleanup old code (#1650) #247
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: Python Tests | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/ci-python.yml' | |
- 'build/Dockerfile' | |
- 'extract/**' | |
- 'tests/**' | |
- 'utils/**' | |
- 'poetry.lock' | |
- 'pyproject.toml' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/ci-python.yml' | |
- 'build/Dockerfile' | |
- 'extract/**' | |
- 'tests/**' | |
- 'utils/**' | |
- 'poetry.lock' | |
- 'pyproject.toml' | |
jobs: | |
tests: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { name: '3.10', python: '3.10' } | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Install Poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
id: setup-python | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: poetry run pytest --cov | |
docker: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Lint docker image | |
run: make docker-lint | |
- name: Build & push docker image | |
run: make docker-login && make docker-build && make docker-push | |
env: | |
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Sign docker image | |
run: make docker-sign && make docker-verify | |
env: | |
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | |
COSIGN_KEY: ${{ secrets.COSIGN_KEY }} | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }} |