forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/update-metadata-action'
- Loading branch information
Showing
17 changed files
with
835 additions
and
31 deletions.
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 |
---|---|---|
|
@@ -6,4 +6,6 @@ build | |
docs | ||
dist | ||
test-reports | ||
.python-version | ||
.python-version | ||
docker | ||
env |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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,39 @@ | ||
name: Nightly Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
include: | ||
- os: "ubuntu-20.04" | ||
python-version: "3.6" | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
os: ${{ matrix.os }} | ||
|
||
tests-indy: | ||
name: Tests (Indy) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
include: | ||
- os: "ubuntu-20.04" | ||
python-version: "3.6" | ||
|
||
uses: ./.github/workflows/tests-indy.yml | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
os: ${{ matrix.os }} | ||
indy-version: "1.16.0" |
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,20 @@ | ||
name: PR Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
python-version: "3.6" | ||
os: "ubuntu-20.04" | ||
|
||
tests-indy: | ||
name: Tests (Indy) | ||
uses: ./.github/workflows/tests-indy.yml | ||
with: | ||
python-version: "3.6" | ||
indy-version: "1.16.0" | ||
os: "ubuntu-20.04" |
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,99 @@ | ||
name: Publish ACA-Py (Indy) | ||
on: | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
inputs: | ||
indy_version: | ||
description: 'Indy SDK Version' | ||
required: false | ||
type: string | ||
tag: | ||
description: 'Image tag' | ||
required: true | ||
type: string | ||
version: | ||
description: "Version label in image" | ||
required: true | ||
type: string | ||
|
||
env: | ||
INDY_VERSION: 1.16.0 | ||
|
||
jobs: | ||
publish-image: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
|
||
name: Publish (Indy) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Gather image info | ||
id: info | ||
run: | | ||
echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}" | ||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to the GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Image Metadata (manual) | ||
if: github.event_name == 'workflow_dispatch' | ||
id: dispatch-meta | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python | ||
tags: | | ||
type=raw,value=py${{ matrix.python-version }}-indy-${{ inputs.tag }} | ||
- name: Setup Image Metadata (release) | ||
if: github.event_name == 'release' | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python | ||
tags: | | ||
type=semver,pattern=py${{ matrix.python-version }}-indy-{{ inputs.indy_version || env.INDY_VERSION }}-{{version}} | ||
- name: Build and Push Image to ghcr.io | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
context: . | ||
file: docker/Dockerfile.indy | ||
tags: ${{ steps.dispatch-meta.outputs.tags || steps.meta.outputs.tags }} | ||
target: main | ||
build-args: | | ||
python_version=${{ matrix.python-version }} | ||
indy_version=${{ inputs.indy_version || env.INDY_VERSION }} | ||
acapy_version=${{ inputs.version || github.event.release.tag_name }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | ||
|
||
# Temp fix | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
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,91 @@ | ||
name: Publish ACA-Py | ||
on: | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Image tag' | ||
required: true | ||
type: string | ||
version: | ||
description: "Version label in image" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
publish-image: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
|
||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Gather image info | ||
id: info | ||
run: | | ||
echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}" | ||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to the GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Image Metadata (manual) | ||
if: github.event_name == 'workflow_dispatch' | ||
id: dispatch-meta | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python | ||
tags: | | ||
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag }} | ||
- name: Setup Image Metadata (release) | ||
if: github.event_name == 'release' | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python | ||
tags: | | ||
type=semver,pattern=py${{ matrix.python-version }}-{{version}} | ||
- name: Build and Push Image to ghcr.io | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
context: . | ||
file: docker/Dockerfile | ||
tags: ${{ steps.dispatch-meta.outputs.tags || steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
python_version=${{ matrix.python-version }} | ||
acapy_version=${{ inputs.version || github.event.release.tag_name }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | ||
|
||
# Temp fix | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
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,58 @@ | ||
name: Tests (Indy) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
required: true | ||
type: string | ||
indy-version: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
tests: | ||
name: Test Python ${{ inputs.python-version }} on Indy ${{ inputs.indy-version }} | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache image layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache-test | ||
key: ${{ runner.os }}-buildx-test-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx-test- | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build test image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
load: true | ||
context: . | ||
file: docker/Dockerfile.indy | ||
target: acapy-test | ||
tags: acapy-test:latest | ||
build-args: | | ||
python_version=${{ inputs.python-version }} | ||
indy_version=${{ inputs.indy-version }} | ||
cache-from: type=local,src=/tmp/.buildx-cache-test | ||
cache-to: type=local,dest=/tmp/.buildx-cache-test-new,mode=max | ||
|
||
# Temp fix | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache-test | ||
mv /tmp/.buildx-cache-test-new /tmp/.buildx-cache-test | ||
- name: Run pytest | ||
run: | | ||
docker run --rm acapy-test:latest |
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,40 @@ | ||
name: Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
tests: | ||
name: Test Python ${{ inputs.python-version }} | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements*.txt' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip3 install --no-cache-dir \ | ||
-r requirements.txt \ | ||
-r requirements.askar.txt \ | ||
-r requirements.bbs.txt \ | ||
-r requirements.dev.txt | ||
- name: Tests | ||
run: | | ||
pytest --junitxml=pytest.xml | ||
- name: Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: pytest.xml |
Oops, something went wrong.