Skip to content

Add 1.5.2 changelog #1855

Add 1.5.2 changelog

Add 1.5.2 changelog #1855

Workflow file for this run

name: Test and Build Docker Images
on:
push:
branches:
- "*"
pull_request:
workflow_call:
env:
DOCKERHUB_ORG: sslhep
jobs:
build-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout to repository
uses: actions/checkout@v4.2.1
- name: Read file contents
working-directory: ./.github/workflows
id: set-matrix
run: |
echo "matrix<<EOF" >> $GITHUB_OUTPUT
cat deploy-config.json >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
test:
needs: build-matrix
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
python-version: ["3.10"]
app: "${{fromJson(needs.build-matrix.outputs.matrix)}}"
runs-on: ubuntu-22.04
steps:
- name: Checkout to repository
uses: actions/checkout@v4.2.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
if: ${{ matrix.app.test_required }}
- name: Install poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: 1.8.3
- name: Install dependencies
working-directory: ${{ matrix.app.dir_name }}
if: ${{ matrix.app.test_required }}
run: |
echo "${{ matrix.app }}"
poetry install --no-root --with=test
pip list
- name: Lint with Flake8
working-directory: ${{ matrix.app.dir_name }}
if: ${{ matrix.app.test_required }}
run: |
poetry run flake8
- name: Test with pytest
working-directory: ${{ matrix.app.dir_name }}
if: ${{ matrix.app.test_required }}
run: |
PYTHONPATH=src poetry run python -m coverage run -m pytest -r sx
- name: Report coverage with Codecov
if: ${{ matrix.app.test_required }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish:
needs: [build-matrix, test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app: ${{fromJson(needs.build-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4.2.1
- name: Extract tag name
working-directory: ${{ matrix.app.dir_name }}
shell: bash
run: echo "imagetag=sslhep/${{matrix.app.image_name}}:$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
id: extract_tag_name
- name: Extract Cache Dir
working-directory: ${{ matrix.app.dir_name }}
shell: bash
run: echo "cachetag=sslhep/${{matrix.app.image_name}}:buildcache" >> $GITHUB_OUTPUT
id: extract_cache_name
- name: Print Cache Tag Name
shell: bash
run: |
echo "${{ steps.extract_cache_name.outputs.cachetag }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
- name: Login to Docker Hub
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6.9.0
with:
context: ${{ matrix.app.dir_name }}
push: true
tags: ${{ steps.extract_tag_name.outputs.imagetag }}
cache-from: type=${{ format('registry,ref={0}',steps.extract_cache_name.outputs.cachetag) }}
cache-to: type=${{ format('registry,ref={0}',steps.extract_cache_name.outputs.cachetag) }},mode=max
file: ${{ matrix.app.dockerfile }}
platforms: linux/amd64,linux/arm64