aki_prj23_transparenzregister/.github/workflows/test-and-build-action.yaml
dependabot[bot] d6dce1a67e
build(deps): bump actions/setup-python from 4 to 5 (#444)
Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-python/releases">actions/setup-python's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<p>In scope of this release, we update node version runtime from node16
to node20 (<a
href="https://redirect.github.com/actions/setup-python/pull/772">actions/setup-python#772</a>).
Besides, we update dependencies to the latest versions.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0">https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0</a></p>
<h2>v4.8.0</h2>
<h2>What's Changed</h2>
<p>In scope of this release we added support for GraalPy (<a
href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a>).
You can use this snippet to set up GraalPy:</p>
<pre lang="yaml"><code>steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4 
  with:
    python-version: 'graalpy-22.3' 
- run: python my_script.py
</code></pre>
<p>Besides, the release contains such changes as:</p>
<ul>
<li>Trim python version when reading from file by <a
href="https://github.com/FerranPares"><code>@​FerranPares</code></a> in
<a
href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li>
<li>Use non-deprecated versions in examples by <a
href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li>
<li>Change deprecation comment to past tense by <a
href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/723">actions/setup-python#723</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.9.0 to 7.23.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/743">actions/setup-python#743</a></li>
<li>advanced-usage.md: Encourage the use actions/checkout@v4 by <a
href="https://github.com/cclauss"><code>@​cclauss</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/729">actions/setup-python#729</a></li>
<li>Examples now use checkout@v4 by <a
href="https://github.com/simonw"><code>@​simonw</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/738">actions/setup-python#738</a></li>
<li>Update actions/checkout to v4 by <a
href="https://github.com/dmitry-shibanov"><code>@​dmitry-shibanov</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/761">actions/setup-python#761</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/FerranPares"><code>@​FerranPares</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li>
<li><a href="https://github.com/timfel"><code>@​timfel</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a></li>
<li><a
href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v4...v4.8.0">https://github.com/actions/setup-python/compare/v4...v4.8.0</a></p>
<h2>v4.7.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump word-wrap from 1.2.3 to 1.2.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/702">actions/setup-python#702</a></li>
<li>Add range validation for toml files by <a
href="https://github.com/dmitry-shibanov"><code>@​dmitry-shibanov</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/726">actions/setup-python#726</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v4...v4.7.1">https://github.com/actions/setup-python/compare/v4...v4.7.1</a></p>
<h2>v4.7.0</h2>
<p>In scope of this release, the support for reading python version from
pyproject.toml was added (<a
href="https://redirect.github.com/actions/setup-python/pull/669">actions/setup-python#669</a>).</p>
<pre lang="yaml"><code>      - name: Setup Python
        uses: actions/setup-python@v4
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0a5c615913"><code>0a5c615</code></a>
Update action to node20 (<a
href="https://redirect.github.com/actions/setup-python/issues/772">#772</a>)</li>
<li><a
href="0ae58361cd"><code>0ae5836</code></a>
Add example of GraalPy to docs (<a
href="https://redirect.github.com/actions/setup-python/issues/773">#773</a>)</li>
<li><a
href="b64ffcaf5b"><code>b64ffca</code></a>
update actions/checkout to v4 (<a
href="https://redirect.github.com/actions/setup-python/issues/761">#761</a>)</li>
<li><a
href="8d2896179a"><code>8d28961</code></a>
Examples now use checkout@v4 (<a
href="https://redirect.github.com/actions/setup-python/issues/738">#738</a>)</li>
<li><a
href="7bc6abb01e"><code>7bc6abb</code></a>
advanced-usage.md: Encourage the use actions/checkout@v4 (<a
href="https://redirect.github.com/actions/setup-python/issues/729">#729</a>)</li>
<li><a
href="e8111cec9d"><code>e8111ce</code></a>
Bump <code>@​babel/traverse</code> from 7.9.0 to 7.23.2 (<a
href="https://redirect.github.com/actions/setup-python/issues/743">#743</a>)</li>
<li><a
href="a00ea43da6"><code>a00ea43</code></a>
add fix for graalpy ci (<a
href="https://redirect.github.com/actions/setup-python/issues/741">#741</a>)</li>
<li><a
href="8635b1ccc5"><code>8635b1c</code></a>
Change deprecation comment to past tense (<a
href="https://redirect.github.com/actions/setup-python/issues/723">#723</a>)</li>
<li><a
href="f6cc428f53"><code>f6cc428</code></a>
Use non-deprecated versions in examples (<a
href="https://redirect.github.com/actions/setup-python/issues/724">#724</a>)</li>
<li><a
href="5f2af211d6"><code>5f2af21</code></a>
Add GraalPy support (<a
href="https://redirect.github.com/actions/setup-python/issues/694">#694</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/setup-python/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 16:17:55 +01:00

202 lines
6.0 KiB
YAML

name: Test & Build
on:
push:
pull_request:
types: [reopened, opened, synchronize]
release:
types:
- created
jobs:
test:
name: Pytest
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- run: poetry install --without develop,doc,lint --all-extras
- name: Run test suite
run: |
poetry run pytest --junit-xml=unit-test-results.xml --cov-report "xml:coverage.xml" --cov=src --disable-warnings tests/
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: |
coverage.xml
.coverage
- name: Archive unit test results
uses: actions/upload-artifact@v3
with:
name: test-report
path: |
unit-test-results.xml
if-no-files-found: error
coverage_pull_request:
name: Coverage Report on pull request
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'}}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/download-artifact@v3
with:
name: code-coverage-report
- name: Get Cover
uses: orgoro/coverage@v3.1
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.7
thresholdNew: 0.7
thresholdModified: 0.7
coverage_report:
name: Coverage HTML Report
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- run: poetry install --only test --all-extras
- uses: actions/download-artifact@v3
with:
name: code-coverage-report
- name: Make Coverage Report
run: |
poetry run coverage html
- name: Archive builds
uses: actions/upload-artifact@v3
with:
name: Coverage Report HTML
path: htmlcov/
build:
name: Wheel-Build
if: ${{ github.event_name == 'push'}}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- run: |
poetry build
- name: Archive builds
uses: actions/upload-artifact@v3
with:
name: wheel-builds
path: dist/
docker-build:
name: Docker Build
if: ${{ github.event_name == 'push' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'}}
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: wheel-builds
path: dist
- id: tag_or_main
run: |
if [ "$GITHUB_EVENT_NAME" = "release" ]; then
echo "TAG_OR_MAIN=$(echo $GITHUB_REF | awk -F / '{print $NF}')" >> $GITHUB_ENV
echo "LATEST=latest" >> $GITHUB_ENV
elif [ "$GITHUB_EVENT_NAME" = "push" ] && [ "$GITHUB_REF" = "refs/heads/main" ]; then
echo "TAG_OR_MAIN=main" >> $GITHUB_ENV
echo "LATEST=main" >> $GITHUB_ENV
else
echo "TAG_OR_MAIN=experimental" >> $GITHUB_ENV
echo "LATEST=experimental" >> $GITHUB_ENV
fi
- run: |
echo "Print ${{ env.TAG_OR_MAIN }}"
- name: Build All prior to push
run: |
docker build --target ingest --build-arg GIT_HASH=${{github.sha}} .
docker build --target data-transformation --build-arg GIT_HASH=${{github.sha}} .
docker build --target web-server --build-arg GIT_HASH=${{github.sha}} .
docker image ls
- name: Exit workflow on pull request
if: ${{ github.event_name == 'pull_request' }}
run: exit 0
- name: Exit workflow on not main branch
if: ${{ github.ref != 'refs/heads/main' }}
run: exit 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ingest
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: ${{ github.ref == 'refs/heads/main'}}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ingest:${{ env.TAG_OR_MAIN }}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ingest:${{ env.LATEST }}
target: ingest
context: .
- name: Build and push data-transformation
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: ${{ github.ref == 'refs/heads/main'}}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/data-transformation:${{ env.TAG_OR_MAIN }}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/data-transformation:${{ env.LATEST }}
target: data-transformation
context: .
- name: Build and push web-server
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: ${{ github.ref == 'refs/heads/main'}}
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/web-server:${{ env.TAG_OR_MAIN }}
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/web-server:${{ env.LATEST }}
target: web-server
context: .