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

ITHD-233358 Resync Code from Source #5

Merged
merged 30 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2fc245
Bump lxml from 4.9.1 to 4.9.3 (#387)
dependabot[bot] Sep 21, 2023
6ddaf27
Rework structure of CI workflow (#494)
EnricoMi Sep 21, 2023
bd22544
Allow for adding or removing test file path prefix (#495)
EnricoMi Sep 22, 2023
d93dbc0
Releasing v2.10.0
EnricoMi Sep 22, 2023
19b3c29
Specify option in readme to fail action
EnricoMi Sep 22, 2023
38e2922
Reduce output from `action_fail` (#511)
MPV Oct 8, 2023
4e4df66
Test publish on arm64 (#513)
EnricoMi Oct 8, 2023
c0b8fea
Publish ARM images (#512)
mightyguava Oct 9, 2023
a23f810
Mention ARM in README.md (#514)
EnricoMi Oct 9, 2023
560aeb0
Update urllib3 and charset-normalizer, remove unused dependencies (#507)
dependabot[bot] Oct 9, 2023
48fc7ad
Do not publish if tests are cancelled (#515)
EnricoMi Oct 9, 2023
78b6281
Use virtualenv in composite action (#501)
EnricoMi Oct 10, 2023
ca89ad0
Releasing v2.11.0
EnricoMi Oct 10, 2023
7aeefc7
Document using relative paths (#519)
EnricoMi Oct 12, 2023
d826f85
CI: Fix issues with uploaded changed expectation files (#520)
EnricoMi Oct 12, 2023
8cdbc41
Handle incomplete / none JSON elements (#530)
EnricoMi Nov 13, 2023
1b521c1
Add badge JSON to GIST (#536)
EnricoMi Nov 28, 2023
d47d57b
Revert cron time, fix yaml syntax
EnricoMi Nov 28, 2023
65976d5
Have badgen generate workflows and download badges from json
EnricoMi Nov 28, 2023
f0b959b
Use forwarded Gist URL (#537)
EnricoMi Dec 1, 2023
b9929bc
Remove link from emojis in summary MD (#540)
EnricoMi Dec 15, 2023
3cd0197
Improve emoji for passed tests (#542)
EnricoMi Dec 18, 2023
dd65627
Fix failing on no files (#543)
EnricoMi Dec 18, 2023
d764099
Add option to disable status check (#532)
TurnrDev Dec 19, 2023
bea8616
Upgrade CI and Python dependencies (#523)
AdrianDsg Dec 22, 2023
e780361
Releasing v2.12.0
EnricoMi Dec 22, 2023
4a497bd
resync
ahernandez411 Dec 22, 2023
417617d
Merge branch 'master' into ithd-233358-resync-code
ahernandez411 Dec 22, 2023
cbe23ce
Change instances of EnricoMi to im-open
ahernandez411 Dec 22, 2023
d6ab9f4
Merge branch 'ithd-233358-resync-code' of github.com:im-open/publish-…
ahernandez411 Dec 22, 2023
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
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: EnricoMi
github: im-open
136 changes: 136 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: 'Test'
author: 'im-open'
description: 'A GitHub Action that tests this action'

inputs:
os:
description: operating system, e.g. ubuntu-22.04
required: true
python-version:
description: Python version, e.g. 3.11
required: true

runs:
using: 'composite'
steps:
- name: Setup Ubuntu
if: startsWith(inputs.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install language-pack-en language-pack-de
shell: bash

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

- name: Checkout
uses: actions/checkout@v4

- name: Detect OS
id: os
env:
OS: ${{ inputs.os }}
run: |
case "$OS" in
ubuntu*)
echo "pip-cache=~/.cache/pip" >> $GITHUB_OUTPUT
;;
macos*)
echo "pip-cache=~/Library/Caches/pip" >> $GITHUB_OUTPUT
;;
windows*)
echo "pip-cache=~\\AppData\\Local\\pip\\Cache" >> $GITHUB_OUTPUT
;;
esac
echo "date=$(date +%Y%m%d 2> /dev/null || true)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache PIP Packages
uses: actions/cache@v3
id: cache
with:
path: ${{ steps.os.outputs.pip-cache }}
key: ${{ inputs.os }}-pip-test-${{ inputs.python-version }}-${{ hashFiles('**/requirements.txt', '**/constraints.txt') }}-${{ steps.os.outputs.date }}
restore-keys: |
${{ inputs.os }}-pip-test-${{ inputs.python-version }}-${{ hashFiles('**/requirements.txt', '**/constraints.txt') }}-
${{ inputs.os }}-pip-test-${{ inputs.python-version }}-
${{ inputs.os }}-pip-test-

- 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
shell: bash

- name: Update expectation files
id: changes
continue-on-error: true
run: |
python/test/files/update_expectations.sh
git status

if ! git diff --exit-code || [[ $(git ls-files -o --exclude-standard | wc -l) -gt 0 ]]
then
# 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
exit 1
fi
fi
shell: bash
- name: Upload changed expectation files
if: steps.changes.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: Changed expectations
path: changed-expectations.zip
if-no-files-found: error

- name: PyTest
env:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest.xml
shell: bash

- name: PyTest (EST)
env:
TZ: US/Eastern
LANG: "en_US.UTF-8"
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-est.xml
shell: bash

- name: PyTest (CET)
env:
TZ: Europe/Berlin
LANG: "de_DE.UTF-8"
PYTHONPATH: ..
run: |
cd python/test
python3 -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
with:
name: Test Results (python-${{ inputs.python-version }}, ${{ inputs.os }})
path: |
test-results/*.xml
unit-test-results.json
30 changes: 26 additions & 4 deletions .github/workflows/badges.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this workflow is really required is it? We could not even include it if we didn't want to. Unless its easier to just keep it as part of the fork.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get package downloads
id: downloads
Expand All @@ -32,13 +32,24 @@ jobs:
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

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

- name: Upload JSON to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/im-open/612cb538c14731f1a8fefe504f519395
file: downloads.json

workflows:
name: Dependent workflows
runs-on: ubuntu-latest
Expand All @@ -47,7 +58,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Fetch workflows
id: workflows
Expand All @@ -61,9 +72,20 @@ jobs:
color: blue
path: workflows.svg

- name: Create JSON
run: |
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
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
gistURL: https://gist.githubusercontent.com/im-open/612cb538c14731f1a8fefe504f519395
file: workflows.svg

- name: Upload JSON to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/im-open/612cb538c14731f1a8fefe504f519395
file: workflows.json
Loading