Skip to content

chore(deps): bump docker/login-action from 4.0.0 to 4.1.0 #863

chore(deps): bump docker/login-action from 4.0.0 to 4.1.0

chore(deps): bump docker/login-action from 4.0.0 to 4.1.0 #863

Workflow file for this run

name: Python package
on:
# The following config trigger the workflow upon commits but not tags creation
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
# Ensure this workflow's jobs can be triggered from other workflows, e.g. publish
workflow_call:
jobs:
py36:
runs-on: ubuntu-latest
container: python:3.6
steps:
- uses: actions/checkout@v4
- run: python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Test with pytest
run: |
pytest -v -n auto --cov=$REPO_NAME --cov-report=xml --junitxml=junit/test-results-3.6.xml
env:
# Use custom token if available, otherwise fall back to GITHUB_TOKEN (for Dependabot PRs)
LASTVERSION_GITHUB_API_TOKEN: ${{ secrets.LASTVERSION_GITHUB_API_TOKEN || github.token }}
- name: Update .spec files
run: |
# ensure changelog is generated
echo "%packager Dick Solomon <info@example.com>" >> ~/.rpmmacros
cd tests
lastversion brotli.spec
lastversion nginx-module-security-headers.spec
if lastversion libmozjpeg.spec; then
exit 1
fi
rm -rf libmozjpeg.spec
env:
# Use custom token if available, otherwise fall back to GITHUB_TOKEN (for Dependabot PRs)
LASTVERSION_GITHUB_API_TOKEN: ${{ secrets.LASTVERSION_GITHUB_API_TOKEN || github.token }}
- name: 'Upload brotli.spec artifact'
uses: actions/upload-artifact@v7
with:
name: brotli.spec
path: tests/brotli.spec
- name: 'Upload nginx-module-security-headers.spec artifact'
uses: actions/upload-artifact@v7
with:
name: nginx-module-security-headers.spec
path: tests/nginx-module-security-headers.spec
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 7
matrix:
python-version: ["3.9", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Extract repository name which is also our primary package name
run: echo "REPO_NAME=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies will speed up subsequent runs
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# style and complexity checks (exit-zero: informational, pre-commit enforces)
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
# ## limits ssh access and adds the ssh public keys of the listed GitHub users
# limit-access-to-users: dvershinin
- name: Test with pytest
run: |
pytest -v -n auto --cov=$REPO_NAME --cov-report=xml --junitxml=junit/test-results-${{ matrix.python-version }}.xml
env:
# Use custom token if available, otherwise fall back to GITHUB_TOKEN (for Dependabot PRs)
LASTVERSION_GITHUB_API_TOKEN: ${{ secrets.LASTVERSION_GITHUB_API_TOKEN || github.token }}
- name: Upload pytest test results
uses: actions/upload-artifact@v7
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Upload coverage to Codacy
# Skip for Dependabot PRs which don't have access to secrets
if: github.actor != 'dependabot[bot]'
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
build-brotli-rpm:
needs: py36
runs-on: ubuntu-latest
container: getpagespeed/rpmbuilder:centos-8
steps:
- name: Download brotli.spec artifact
uses: actions/download-artifact@v8
with:
name: brotli.spec
- name: Build updated spec
run: |
mkdir -p /github/home/rpmbuild/{SOURCES,SPECS}/
mv *.spec /sources/
build
build-nginx-module-security-headers-rpm:
needs: py36
runs-on: ubuntu-latest
container: getpagespeed/rpmbuilder:centos-8
steps:
- name: Download nginx-module-security-headers.spec artifact
uses: actions/download-artifact@v8
with:
name: nginx-module-security-headers.spec
- name: Build updated spec
run: |
mkdir -p /github/home/rpmbuild/{SOURCES,SPECS}/
mv *.spec /sources/
yum -y install nginx-devel
build