Skip to content

Update lock.yaml

Update lock.yaml #290

Workflow file for this run

name: "[C]ontinuous [I]ntegration"
on:
push:
env:
OS: ubuntu-latest
ARCHITECTURE: x64
PYTHON_VERSION: 3.12.1
PYRIGHT_PYTHON_FORCE_VERSION: latest
DOCKER_BUILDKIT: 1
permissions:
checks: write
contents: read
pull-requests: write
jobs:
pypyr_lock:
name: pypyr lock
runs-on: ubuntu-latest
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
with:
ssh-private-key: ${{ secrets.SSH_KEY_PRIVATE }}
- name: setup python @ ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
architecture: ${{ env.ARCHITECTURE }}
python-version: ${{ env.PYTHON_VERSION }}
# includes poetry install
- name: scripts/prepare.ba.sh
run: bash scripts/prepare.ba.sh
- name: pypyr lock
run: pipx run -- pypyr lock freeze=True
# TODO commit back upgraded requirements
# SRC: https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md
semantic-release:
name: semantic-release
needs: pypyr_lock
runs-on: ubuntu-latest
permissions:
issues: write # to be able to comment on released issues
contents: write # to be able to publish a GitHub release
id-token: write # to enable use of OIDC for npm provenance
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: percebus/github-actions-node/.github/actions/node_setup@main
- uses: percebus/github-actions-npm/.github/actions/npm_install@main
- name: semantic-release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
verify:
name: Verify
needs: semantic-release
runs-on: ubuntu-latest
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
with:
ssh-private-key: ${{ secrets.SSH_KEY_PRIVATE }}
- name: setup python @ ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
architecture: ${{ env.ARCHITECTURE }}
python-version: ${{ env.PYTHON_VERSION }}
- uses: percebus/github-actions-node/.github/actions/node_setup@main
- uses: percebus/github-actions-npm/.github/actions/npm_install@main
- name: scripts/prepare.ba.sh
run: bash scripts/prepare.ba.sh
- name: pypyr lint
run: pipx run -- pypyr lint stats=True
- name: pypyr test
run: pipx run -- pypyr ci lint=False
- name: Publish test-results.xml Summary
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results
- name: Publish test-results.xml
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results.xml
verify_matrix:
name: Verify
needs: verify
if: github.ref == 'refs/heads/main'
continue-on-error: true
strategy:
max-parallel: 10
matrix:
# Different OS
OS:
- ubuntu-latest
- windows-latest
# Past/Future versions
PYTHON_VERSION:
# - 3.11 # poetry is not setup
- 3.12.x # latest 3.12.x
# - 3.13.x # FIXME "The version '3.13' with architecture 'x64' was not found for Ubuntu 22.04."
# Different architectures
ARCHITECTURE:
- x64
# - arm64 # "The version '3.12.x' with architecture 'arm64' was not found for Ubuntu 22.04."
exclude:
# Repetitive from job:verify
- OS: ubuntu-latest
PYTHON_VERSION: 3.12.x
ARCHITECTURE: x64
runs-on: ${{ matrix.OS }}
steps:
# FIXME: Does NOT work on Windows
# - run: echo ${{ github.job }}
# - run: |
# JOB_NAME="OS:${{ matrix.os }}, python@${{ matrix.PYTHON_VERSION }}, node@${{ matrix.NODE_VERSION }}, ${{ matrix.ARCHITECTURE }}"
# echo $JOB_NAME
# echo "JOB_NAME=$JOB_NAME" >> $GITHUB_ENV
# - name: echo JOB_NAME
# run: |
# echo "JOB_NAME: ${{ env.JOB_NAME }}"
- uses: percebus/github-actions-common/.github/actions/checkout@main
with:
ssh-private-key: ${{ secrets.SSH_KEY_PRIVATE }}
- name: setup python @ ${{ matrix.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
architecture: ${{ matrix.ARCHITECTURE }}
python-version: ${{ matrix.PYTHON_VERSION }}
- uses: percebus/github-actions-node/.github/actions/node_setup@main
- uses: percebus/github-actions-npm/.github/actions/npm_install@main
- name: scripts/prepare.ba.sh
run: bash scripts/prepare.ba.sh
# FIXME prettier fails on windows
# Because of EOL differences
# Thus, we disabled 'npm'
- name: pypyr test
run: pipx run -- pypyr ci npm=False
docker_compose:
name: docker compose
needs: verify
runs-on: ubuntu-latest
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
with:
ssh-private-key: ${{ secrets.SSH_KEY_PRIVATE }}
- name: scripts/prepare.ba.sh
run: bash scripts/prepare.ba.sh
- name: docker compose up
run: docker compose up --abort-on-container-exit
docker_build_matrix:
if: github.ref == 'refs/heads/main'
name: docker build --target
needs: docker_compose
continue-on-error: true
strategy:
max-parallel: 10
matrix:
DOCKER_TARGET:
# - base
# - project
# - dev
- test
# docker-compose tests this
# - release
runs-on: ubuntu-latest
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
with:
ssh-private-key: ${{ secrets.SSH_KEY_PRIVATE }}
- name: scripts/prepare.ba.sh
run: bash scripts/prepare.ba.sh
- name: "docker build: ${{ matrix.DOCKER_TARGET }}"
run: |
docker build . \
--target ${{ matrix.DOCKER_TARGET }}