mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-25 11:12:33 +02:00
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/docker/login-action/releases">docker/login-action's releases</a>.</em></p> <blockquote> <h2>v3.0.0</h2> <ul> <li>Node 20 as default runtime (requires <a href="https://github.com/actions/runner/releases/tag/v2.308.0">Actions Runner v2.308.0</a> or later) by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/login-action/pull/593">docker/login-action#593</a></li> <li>Bump <code>@actions/core</code> from 1.10.0 to 1.10.1 in <a href="https://redirect.github.com/docker/login-action/pull/598">docker/login-action#598</a></li> <li>Bump <code>@aws-sdk/client-ecr</code> and <code>@aws-sdk/client-ecr-public</code> to 3.410.0 in <a href="https://redirect.github.com/docker/login-action/pull/555">docker/login-action#555</a> <a href="https://redirect.github.com/docker/login-action/pull/560">docker/login-action#560</a> <a href="https://redirect.github.com/docker/login-action/pull/582">docker/login-action#582</a> <a href="https://redirect.github.com/docker/login-action/pull/599">docker/login-action#599</a></li> <li>Bump semver from 6.3.0 to 6.3.1 in <a href="https://redirect.github.com/docker/login-action/pull/556">docker/login-action#556</a></li> <li>Bump https-proxy-agent to 7.0.2 <a href="https://redirect.github.com/docker/login-action/pull/561">docker/login-action#561</a> <a href="https://redirect.github.com/docker/login-action/pull/588">docker/login-action#588</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/login-action/compare/v2.2.0...v3.0.0">https://github.com/docker/login-action/compare/v2.2.0...v3.0.0</a></p> <h2>v2.2.0</h2> <ul> <li>Switch to actions-toolkit implementation by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/login-action/pull/409">docker/login-action#409</a> <a href="https://redirect.github.com/docker/login-action/pull/470">docker/login-action#470</a> <a href="https://redirect.github.com/docker/login-action/pull/476">docker/login-action#476</a></li> <li>Bump <code>@aws-sdk/client-ecr</code> and <code>@aws-sdk/client-ecr-public</code> to 3.347.1 in <a href="https://redirect.github.com/docker/login-action/pull/524">docker/login-action#524</a> <a href="https://redirect.github.com/docker/login-action/pull/364">docker/login-action#364</a> <a href="https://redirect.github.com/docker/login-action/pull/363">docker/login-action#363</a></li> <li>Bump minimatch from 3.0.4 to 3.1.2 in <a href="https://redirect.github.com/docker/login-action/pull/354">docker/login-action#354</a></li> <li>Bump json5 from 2.2.0 to 2.2.3 in <a href="https://redirect.github.com/docker/login-action/pull/378">docker/login-action#378</a></li> <li>Bump http-proxy-agent from 5.0.0 to 7.0.0 in <a href="https://redirect.github.com/docker/login-action/pull/509">docker/login-action#509</a></li> <li>Bump https-proxy-agent from 5.0.1 to 7.0.0 in <a href="https://redirect.github.com/docker/login-action/pull/508">docker/login-action#508</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/login-action/compare/v2.1.0...v2.2.0">https://github.com/docker/login-action/compare/v2.1.0...v2.2.0</a></p> <h2>v2.1.0</h2> <ul> <li>Ensure AWS temp credentials are redacted in workflow logs by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> (<a href="https://redirect.github.com/docker/login-action/issues/275">#275</a>)</li> <li>Bump <code>@actions/core</code> from 1.6.0 to 1.10.0 (<a href="https://redirect.github.com/docker/login-action/issues/252">#252</a> <a href="https://redirect.github.com/docker/login-action/issues/292">#292</a>)</li> <li>Bump <code>@aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0 (<a href="https://redirect.github.com/docker/login-action/issues/298">#298</a>)</li> <li>Bump <code>@aws-sdk/client-ecr-public</code> from 3.53.0 to 3.186.0 (<a href="https://redirect.github.com/docker/login-action/issues/299">#299</a>)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/login-action/compare/v2.0.0...v2.1.0">https://github.com/docker/login-action/compare/v2.0.0...v2.1.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="343f7c4344
"><code>343f7c4</code></a> Merge pull request <a href="https://redirect.github.com/docker/login-action/issues/599">#599</a> from docker/dependabot/npm_and_yarn/aws-sdk-dependenc...</li> <li><a href="aad0f974f2
"><code>aad0f97</code></a> chore: update generated content</li> <li><a href="2e0cd39144
"><code>2e0cd39</code></a> build(deps): bump the aws-sdk-dependencies group with 2 updates</li> <li><a href="203bc9c4ef
"><code>203bc9c</code></a> Merge pull request <a href="https://redirect.github.com/docker/login-action/issues/588">#588</a> from docker/dependabot/npm_and_yarn/proxy-agent-depen...</li> <li><a href="2199648fc8
"><code>2199648</code></a> chore: update generated content</li> <li><a href="b489376173
"><code>b489376</code></a> build(deps): bump the proxy-agent-dependencies group with 1 update</li> <li><a href="7c309e74e6
"><code>7c309e7</code></a> Merge pull request <a href="https://redirect.github.com/docker/login-action/issues/598">#598</a> from docker/dependabot/npm_and_yarn/actions/core-1.10.1</li> <li><a href="0ccf222961
"><code>0ccf222</code></a> chore: update generated content</li> <li><a href="56d703e106
"><code>56d703e</code></a> Merge pull request <a href="https://redirect.github.com/docker/login-action/issues/597">#597</a> from docker/dependabot/github_actions/aws-actions/con...</li> <li><a href="24d3b3519e
"><code>24d3b35</code></a> build(deps): bump <code>@actions/core</code> from 1.10.0 to 1.10.1</li> <li>Additional commits viewable in <a href="https://github.com/docker/login-action/compare/v2...v3">compare view</a></li> </ul> </details> <br /> [](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>
220 lines
6.2 KiB
YAML
220 lines
6.2 KiB
YAML
name: Test & Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
- '!dependabot/**'
|
|
pull_request:
|
|
types: [reopened, opened, synchronize]
|
|
branches:
|
|
- '*'
|
|
- '!dependabot/**'
|
|
release:
|
|
types:
|
|
- created
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install Cuda
|
|
run: |
|
|
sudo apt update
|
|
# sudo apt install cuda-10-0 -y
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.6.1
|
|
virtualenvs-path: ~/local/share/virtualenvs
|
|
- id: cache-pipenv
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.local/share/virtualenvs
|
|
key: venv
|
|
- 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 tests/
|
|
- name: Archive code coverage results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: code-coverage-report
|
|
path: |
|
|
coverage.xml
|
|
.coverage
|
|
- name: Archive code coverage results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: test-report
|
|
path: |
|
|
unit-test-results.xml
|
|
if-no-files-found: error
|
|
|
|
coverage_pull_request:
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
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:
|
|
if: ${{ github.event_name == 'push' }}
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
- id: cache-pipenv
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.local/share/virtualenvs
|
|
key: venv
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.6.1
|
|
virtualenvs-path: ~/local/share/virtualenvs
|
|
- 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:
|
|
if: ${{ github.event_name == 'push' }} && !startsWith(github.ref, 'refs/heads/dependabot/')
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.6.1
|
|
virtualenvs-path: ~/local/share/virtualenvs
|
|
- id: cache-pipenv
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.local/share/virtualenvs
|
|
key: venv
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- run: |
|
|
poetry build
|
|
- name: Archive builds
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: wheel-builds
|
|
path: dist/
|
|
|
|
docker-build:
|
|
if: ${{ github.event_name == 'push' }} && !startsWith(github.ref, 'refs/heads/dependabot/')
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
|
|
- 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 .
|
|
docker build --target data-transformation .
|
|
docker build --target web-server .
|
|
docker image ls
|
|
|
|
- name: Exit workflow on pull request
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
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@v4
|
|
with:
|
|
push: true
|
|
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@v4
|
|
with:
|
|
push: true
|
|
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@v4
|
|
with:
|
|
push: true
|
|
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: .
|