Continuous Integration #37
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
name: Continuous Integration | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate Fake JUnit Report | |
run: | | |
cat <<EOF > report.xml | |
<testsuites> | |
<testsuite name="ExampleTestSuite" tests="1" failures="0" errors="0" skipped="0"> | |
<testcase classname="example.TestClass" name="testExample" time="0.001"/> | |
</testsuite> | |
</testsuites> | |
EOF | |
- name: Print JUnit Report Content | |
shell: bash | |
run: | | |
cat report.xml | |
- shell: bash | |
env: | |
FILES: toto.xml | |
run: | | |
set -x | |
# Check if FILES and MERGIFY_CI_ISSUES_TOKEN are set and not empty | |
if [ -z "$FILES" ]; then | |
echo "Error: FILES is not set or is empty" | |
exit 1 | |
fi | |
if [ -z "$MERGIFY_CI_ISSUES_TOKEN" ]; then | |
echo "Error: MERGIFY_CI_ISSUES_TOKEN is not set or is empty" | |
exit 1 | |
fi | |
- name: Mergify JUnit XML Upload | |
if: always() | |
uses: mergifyio/gha-ci-issues@v1 |