This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
forked from EnricoMi/publish-unit-test-result-action
-
Notifications
You must be signed in to change notification settings - Fork 0
ITHD-233358 Resync Code from Source #5
Merged
Merged
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] 6ddaf27
Rework structure of CI workflow (#494)
EnricoMi bd22544
Allow for adding or removing test file path prefix (#495)
EnricoMi d93dbc0
Releasing v2.10.0
EnricoMi 19b3c29
Specify option in readme to fail action
EnricoMi 38e2922
Reduce output from `action_fail` (#511)
MPV 4e4df66
Test publish on arm64 (#513)
EnricoMi c0b8fea
Publish ARM images (#512)
mightyguava a23f810
Mention ARM in README.md (#514)
EnricoMi 560aeb0
Update urllib3 and charset-normalizer, remove unused dependencies (#507)
dependabot[bot] 48fc7ad
Do not publish if tests are cancelled (#515)
EnricoMi 78b6281
Use virtualenv in composite action (#501)
EnricoMi ca89ad0
Releasing v2.11.0
EnricoMi 7aeefc7
Document using relative paths (#519)
EnricoMi d826f85
CI: Fix issues with uploaded changed expectation files (#520)
EnricoMi 8cdbc41
Handle incomplete / none JSON elements (#530)
EnricoMi 1b521c1
Add badge JSON to GIST (#536)
EnricoMi d47d57b
Revert cron time, fix yaml syntax
EnricoMi 65976d5
Have badgen generate workflows and download badges from json
EnricoMi f0b959b
Use forwarded Gist URL (#537)
EnricoMi b9929bc
Remove link from emojis in summary MD (#540)
EnricoMi 3cd0197
Improve emoji for passed tests (#542)
EnricoMi dd65627
Fix failing on no files (#543)
EnricoMi d764099
Add option to disable status check (#532)
TurnrDev bea8616
Upgrade CI and Python dependencies (#523)
AdrianDsg e780361
Releasing v2.12.0
EnricoMi 4a497bd
resync
ahernandez411 417617d
Merge branch 'master' into ithd-233358-resync-code
ahernandez411 cbe23ce
Change instances of EnricoMi to im-open
ahernandez411 d6ab9f4
Merge branch 'ithd-233358-resync-code' of github.com:im-open/publish-…
ahernandez411 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
github: EnricoMi | ||
github: im-open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.