Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Sync with Upstream #7

Merged
merged 38 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8551547
Upgrade lxml to 5.1.0 (#433)
EnricoMi Jan 9, 2024
5a94863
Check if venv package is installed already (#558)
EnricoMi Feb 3, 2024
4e12145
Releasing v2.13.0
EnricoMi Feb 3, 2024
04f29da
Add macOS 14 to CI (#563)
EnricoMi Feb 3, 2024
ad0696a
Move Python 3.12 from pre-release to release (#569)
EnricoMi Feb 3, 2024
8fdc3ca
Update expectation files
EnricoMi Feb 3, 2024
a5faf19
Assert JSON result of test files (#567)
EnricoMi Feb 3, 2024
5724834
Publish JSON even when `check_run` is false (#568)
EnricoMi Feb 3, 2024
af4a2cf
Quote vars to support values with spaces (#571)
EnricoMi Feb 6, 2024
0ccc2cd
Uprade actions/cache to 4 in composite action (#574)
EnricoMi Feb 6, 2024
8885e27
Releasing v2.14.0
EnricoMi Feb 6, 2024
783d23b
Upgrade CI actions (#573)
EnricoMi Feb 21, 2024
15fe4f4
Fix grouping lines in GH actions output (#577)
EnricoMi Feb 23, 2024
8d1d324
Upgrade upload-artifact action in ci-cd.yml
EnricoMi Feb 24, 2024
b91eeb9
Link workflows badge to dependents
EnricoMi Feb 24, 2024
fe2d5fc
OS-specific composite actions (#576)
EnricoMi Feb 27, 2024
e22cb89
Releasing v2.15.0
EnricoMi Feb 27, 2024
328b424
Fix typo in windows action
EnricoMi Feb 28, 2024
f355d34
Releasing v2.15.1
EnricoMi Feb 28, 2024
3a5290c
Replace day with d in docker badge, always run bash windows
EnricoMi Feb 28, 2024
631cb1c
Do not use cache for scheduled CI-CD run
EnricoMi Mar 16, 2024
466ab0b
Upgrade dependencies (#585)
EnricoMi Mar 20, 2024
b25bb15
Releasing v2.16.0
EnricoMi Mar 20, 2024
fbe9920
Quote python bin in windows bash action (#587)
EnricoMi Mar 21, 2024
30eadd5
Releasing v2.16.1
EnricoMi Mar 21, 2024
78c6824
Use venv to test OS (#589)
EnricoMi Apr 4, 2024
b9d4934
Publish macos with Python 3.8 on macos-12, not latest (#595)
EnricoMi Apr 27, 2024
eae46b9
Remove macos-11 from CI (#600)
EnricoMi May 22, 2024
96c9bf7
Test on ubuntu-24.04 (#599)
EnricoMi May 22, 2024
e444c4e
Upgrade dependencies (#606)
EnricoMi Jul 8, 2024
0e2e68b
Avoid escaped quotes in Windows PowerShell action (#603)
EnricoMi Jul 8, 2024
6bfefcd
Remove PIP dependabot config
EnricoMi Jul 9, 2024
912d4a6
Bump docker/build-push-action from 5 to 6 (#611)
dependabot[bot] Jul 9, 2024
14102cd
Releasing v2.17.0
EnricoMi Jul 10, 2024
567cc7f
CI: Do not upload docker build record (#616)
EnricoMi Jul 11, 2024
c7f51e6
Disable upload of .dockerbuild file in deploy job
EnricoMi Jul 14, 2024
673174d
Add default path and message for parse error and suite output annotat…
EnricoMi Sep 4, 2024
82082da
Releasing v2.17.1
EnricoMi Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 41 additions & 19 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:

- name: Setup Python
if: inputs.python-version != 'installed'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

Expand All @@ -49,8 +49,9 @@ runs:
shell: bash

- name: Cache PIP Packages
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
if: github.event_name != 'schedule'
with:
path: ${{ steps.os.outputs.pip-cache }}
key: ${{ inputs.os }}-pip-test-${{ inputs.python-version }}-${{ hashFiles('**/requirements.txt', '**/constraints.txt') }}-${{ steps.os.outputs.date }}
Expand All @@ -61,16 +62,37 @@ runs:

- name: Install Python dependencies
run: |
python3 -V
python3 -m pip freeze | sort
python3 -m pip cache info || true
python3 -m pip cache list || true
python3 -m pip install --upgrade --force pip wheel
python3 -m pip install --force -r python/requirements.txt
python3 -m pip install --force -r python/test/requirements.txt -c python/test/constraints.txt
python3 -m pip freeze | sort
python3 -m pip cache info || true
python3 -m pip cache list || true
python -m venv "$RUNNER_TEMP/venv"
echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH"
echo "$RUNNER_TEMP/venv/Scripts" >> "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/venv/bin:$RUNNER_TEMP/venv/Scripts:$PATH"
which python

# inspect pip cache
python -m pip freeze | sort
python -m pip cache info || true
python -m pip cache list || true

# remove cached built whl files
rm -rf "$(python -m pip cache info | grep ".*[Ww]heels location: " | cut -d ":" -f 2- | cut -d " " -f 2-)"
python -m pip cache list || true

# install dependencies
python_minor_version="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
python -m pip install --force -r python/requirements-$python_minor_version.txt
python -m pip install --force -r python/test/requirements.txt -c python/test/constraints.txt

# inspect pip cache
python -m pip freeze | sort
python -m pip cache info || true
python -m pip cache list || true

# assert no whl files have been built
if python -m pip cache info && [[ "$(python -m pip cache info | grep "Number of .*wheels:")" != "Number of "*"wheels: 0" ]]
then
echo "Dependency whl files have been built"
exit 1
fi
shell: bash

- name: Update expectation files
Expand All @@ -85,16 +107,16 @@ runs:
# we only upload the changed files if we can find zip
if which zip
then
(git diff --name-only && git ls-files -o --exclude-standard) | xargs -d "\n" zip changed-expectations.zip
(git diff --name-only && git ls-files -o --exclude-standard) | xargs zip changed-expectations.zip
exit 1
fi
fi
shell: bash
- name: Upload changed expectation files
if: steps.changes.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Changed expectations
name: Changed expectations (python-${{ inputs.python-version }}, ${{ inputs.os }})
path: changed-expectations.zip
if-no-files-found: error

Expand All @@ -103,7 +125,7 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest.xml
shell: bash

- name: PyTest (EST)
Expand All @@ -113,7 +135,7 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-est.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-est.xml
shell: bash

- name: PyTest (CET)
Expand All @@ -123,12 +145,12 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-cet.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-cet.xml
shell: bash

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Test Results (python-${{ inputs.python-version }}, ${{ inputs.os }})
path: |
Expand Down
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
9 changes: 5 additions & 4 deletions .github/upgrade-pip-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
set -euo pipefail

base="$(dirname "$0")"
python_minor_version="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"

pip install --upgrade --force pip==22.0.0
pip install --upgrade --upgrade-strategy eager -r "$base/../python/requirements-direct.txt"
pip install --upgrade --force pip==24.0.0
pip install --upgrade --upgrade-strategy eager -r "$base/../python/requirements.txt"

pip install pipdeptree
pipdeptree --packages="$(sed -e "s/;.*//" -e "s/=.*//g" "$base/../python/requirements-direct.txt" | paste -s -d ,)" --freeze > "$base/../python/requirements.txt"
pipdeptree --packages="$(sed -e "s/;.*//" -e "s/=.*//g" "$base/../python/requirements.txt" | paste -s -d ,)" --freeze > "$base/../python/requirements-$python_minor_version.txt"

git diff "$base/../python/requirements.txt"
git diff "$base/../python/requirements-$python_minor_version.txt"

10 changes: 5 additions & 5 deletions .github/workflows/badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf
with:
label: Docker pulls
status: ${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/day)
status: ${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/d)
color: blue
path: downloads.svg

- name: Create JSON
run: |
echo '{"subject": "Docker pulls", "status": "${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/day)", "color": "blue"}' > downloads.json
echo '{"subject": "Docker pulls", "status": "${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/d)", "color": "blue"}' > downloads.json

- name: Upload badge to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
uses: ./misc/action/fetch-workflows

- name: Create badge
uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8
with:
label: GitHub Workflows
status: ${{ steps.workflows.outputs.total_workflows }}
Expand All @@ -77,14 +77,14 @@ jobs:
echo '{"subject": "GitHub Workflows", "status": "${{ steps.workflows.outputs.total_workflows }}", "color": "blue"}' > workflows.json

- name: Upload badge to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
uses: andymckay/append-gist-action@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
file: workflows.svg

- name: Upload JSON to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
uses: andymckay/append-gist-action@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
Expand Down
40 changes: 31 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '*'
pull_request:
schedule:
- cron: '0 16 * * *'
- cron: '10 9 * * *'
workflow_dispatch:
permissions: {}

Expand All @@ -20,33 +20,53 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check requirements.txt against requirements-direct.txt
- name: Check requirements.txt
run: |
(diff -w python/requirements-direct.txt python/requirements.txt || true) | (! grep -e "^<")
(diff -w <(grep -v "python_version > '3.7'" python/requirements.txt | sed -e "s/;.*//") python/requirements-3.7.txt || true) | (! grep -e "^<")
(diff -w <(grep -v "python_version <= '3.7'" python/requirements.txt | sed -e "s/;.*//") python/requirements-post-3.7.txt || true) | (! grep -e "^<")
shell: bash
- name: Check for dependency updates
continue-on-error: true
run:
.github/upgrade-pip-packages.sh
run: |
pip install tox
tox
git diff --exit-code
shell: bash

test-mac:
name: "Test macOS"
uses: "./.github/workflows/test-os.yml"
with:
os: '["macos-11", "macos-12", "macos-13"]'
os: '["macos-12", "macos-13", "macos-14"]'
python-version: '["3.10", "3.11", "3.12", "installed"]'
include: >
[
{"os": "macos-12", "python-version": "3.8"},
{"os": "macos-12", "python-version": "3.9"},
{"os": "macos-13", "python-version": "3.8"},
{"os": "macos-13", "python-version": "3.9"},
]

test-lnx:
name: "Test Ubuntu"
uses: "./.github/workflows/test-os.yml"
with:
os: '["ubuntu-20.04", "ubuntu-22.04"]'
os: '["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]'
python-version: '["3.9", "3.10", "3.11", "3.12", "installed"]'
include: >
[
{"os": "ubuntu-20.04", "python-version": "3.7"},
{"os": "ubuntu-20.04", "python-version": "3.8"},
{"os": "ubuntu-22.04", "python-version": "3.8"},
]

test-win:
name: "Test Windows"
uses: "./.github/workflows/test-os.yml"
with:
os: '["windows-2019", "windows-2022"]'
python-version: '["3.8", "3.9", "3.10", "3.11", "3.12", "installed"]'
include: '[{"os": "windows-2019", "python-version": "3.7"}]'

publish:
name: "Publish"
Expand Down Expand Up @@ -136,7 +156,7 @@ jobs:
password: ${{ secrets.CR_PAT }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
Expand All @@ -151,13 +171,15 @@ jobs:
needs.config-deploy.outputs.image == 'Dockerfile' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
)
}}
env:
DOCKER_BUILD_RECORD_UPLOAD: false

event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
Loading
Loading