Skip to content

build(deps): bump aioswitcher from 6.1.3 to 6.2.0 #722

build(deps): bump aioswitcher from 6.1.3 to 6.2.0

build(deps): bump aioswitcher from 6.1.3 to 6.2.0 #722

Workflow file for this run

---
name: Pull request build
on:
pull_request:
# branches:
# - dev
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
build-app:
runs-on: ubuntu-latest
name: Build project
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.13'
- name: Cache pip repository
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements_test.txt') }}
- name: Prepare python environment
run: |
pip install --upgrade pip
pip install -r requirements.txt -r requirements_test.txt
- name: Lint project
run: |
ruff check app/
ruff format --check app/
mypy --ignore-missing-imports app/
- name: Test project
run: pytest -v --cov --cov-report=xml:coverage.xml --junit-xml junit.xml
- name: Report test summary
uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0
if: always()
with:
test_changes_limit: 0
files: ./junit.xml
report_individual_runs: true
- name: Push to CodeCov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
build-docker:
runs-on: ubuntu-latest
name: Build docker
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Hadolint Dockerfile
id: hadolint
uses: hadolint/hadolint-action@2a66e89f53d0771bb131a7fa31f3136336094aa6 # v3.4.0
with:
dockerfile: Dockerfile
- name: Get current date
id: getDate
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Build docker image (no push)
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
build-args: |
VCS_REF=${{ github.sha }}
BUILD_DATE=${{ steps.getDate.outputs.date }}
VERSION=testing
tags: tomerfi/switcher_webapi:testing
cache-from: type=gha
cache-to: type=gha,mode=max
e2e-smoke-test:
needs: build-docker
runs-on: ubuntu-latest
name: E2E smoke test
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Build image for testing
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
load: true
tags: switcher_webapi:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run container and test health endpoint
run: |
docker run -d --name test-container -p 8000:8000 switcher_webapi:test
for i in {1..12}; do
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8000/health || true)
[ "$response" = "200" ] && break
sleep 5
done
docker logs test-container
docker stop test-container
if [ "$response" != "200" ]; then
echo "Health check failed with status $response"
exit 1
fi
echo "Health check passed with status $response"