Bump bcrypt from 4.2.0 to 4.2.1 #303
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: Pipeline | |
on: push | |
jobs: | |
code-quality: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: ./.github/actions/setup-environment | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction --no-root | |
- name: Run ruff | |
run: | | |
poetry run pre-commit run -a | |
run-build-image-tests: | |
needs: code-quality | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.11.10", "3.12.7", "3.13.0"] | |
os_variant: ["bookworm", "slim-bookworm"] | |
poetry_version: ["1.6.1", "1.7.1", "1.8.4"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Expose GitHub Runtime | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Set up Python environment | |
uses: ./.github/actions/setup-environment | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction --no-root | |
- name: Run tests for image builds with pytest | |
env: | |
PYTHON_VERSION: ${{ matrix.python_version }} | |
OS_VARIANT: ${{ matrix.os_variant }} | |
POETRY_VERSION: ${{ matrix.poetry_version }} | |
run: | | |
poetry run pytest tests/build_image --cov --cov-report=xml:build_image_coverage_report.xml | |
- name: Upload coverage report to artifactory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-image-coverage-report-${{ matrix.python_version }}-${{ matrix.os_variant }}-${{ matrix.poetry_version }} | |
path: build_image_coverage_report.xml | |
if-no-files-found: error | |
retention-days: 1 | |
run-publish-image-tests: | |
needs: code-quality | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.11.10", "3.12.7", "3.13.0"] | |
os_variant: ["bookworm", "slim-bookworm"] | |
poetry_version: ["1.6.1", "1.7.1", "1.8.4"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Expose GitHub Runtime | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Set up Python environment | |
uses: ./.github/actions/setup-environment | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install --no-interaction --no-root | |
- name: Run tests for image publishing with pytest | |
env: | |
PYTHON_VERSION: ${{ matrix.python_version }} | |
OS_VARIANT: ${{ matrix.os_variant }} | |
POETRY_VERSION: ${{ matrix.poetry_version }} | |
run: | | |
poetry run pytest tests/publish_image --cov --cov-report=xml:publish_image_coverage_report.xml | |
- name: Upload coverage report to artifactory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: publish-image-coverage-report-${{ matrix.python_version }}-${{ matrix.os_variant }}-${{ matrix.poetry_version }} | |
path: publish_image_coverage_report.xml | |
if-no-files-found: error | |
retention-days: 1 | |
upload-test-coverage-reports: | |
needs: | |
- run-build-image-tests | |
- run-publish-image-tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Download coverage reports from artifactory | |
uses: actions/download-artifact@v3 | |
- name: Compile the relevant reports | |
run: | | |
find . -name "*.xml" -exec cp {} . \; | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./build_image_coverage_report.xml,./publish_image_coverage_report.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
publish-all-images: | |
needs: | |
- upload-test-coverage-reports | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.11.10", "3.12.7", "3.13.0"] | |
os_variant: ["bookworm", "slim-bookworm"] | |
poetry_version: ["1.6.1", "1.7.1", "1.8.4"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Expose GitHub Runtime | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Get Git Commit Tag Name | |
uses: olegtarasov/[email protected] | |
- name: Set up Python environment | |
uses: ./.github/actions/setup-environment | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction --no-root | |
- name: Publish Images to Docker Hub | |
env: | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
PYTHON_VERSION: ${{ matrix.python_version }} | |
OS_VARIANT: ${{ matrix.os_variant }} | |
POETRY_VERSION: ${{ matrix.poetry_version }} | |
run: | | |
poetry run python -m build.publish |