Skip to content

Commit

Permalink
Merge branch 'main' into vlee/lightwebhook
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlee0505 authored Feb 8, 2023
2 parents 6cff03b + 3c3a668 commit 46a6dae
Show file tree
Hide file tree
Showing 144 changed files with 1,703 additions and 748 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 4 additions & 2 deletions .github/workflows/blackformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Black Code Formatter Check
uses: psf/black@stable
9 changes: 6 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ jobs:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')

permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: python

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
8 changes: 4 additions & 4 deletions .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
steps:
- name: checkout-acapy
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: acapy
#- name: run-von-network
# uses: ./acapy/actions/run-von-network
# uses: ./acapy/.github/actions/run-von-network
#- name: run-indy-tails-server
# uses: ./acapy/actions/run-indy-tails-server
# uses: ./acapy/.github/actions/run-indy-tails-server
- name: run-integration-tests
uses: ./acapy/actions/run-integration-tests
uses: ./acapy/.github/actions/run-integration-tests
# to run with a specific set of tests include the following parameter:
# with:
# TEST_SCOPE: "-t @T001-RFC0037"
97 changes: 97 additions & 0 deletions .github/workflows/publish-indy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Publish ACA-Py Image (Indy)
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image (Indy ${{ inputs.indy_version || '1.16.0' }})
on:
release:
types: [released]

workflow_dispatch:
inputs:
indy_version:
description: 'Indy SDK Version'
required: true
default: 1.16.0
type: string
tag:
description: 'Image tag'
required: true
type: string

# Note:
# - ACA-Py with Indy SDK image builds do not include support for the linux/arm64 platform.
# - See notes below for details.

env:
INDY_VERSION: ${{ inputs.indy_version || '1.16.0' }}

jobs:
publish-image:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.9']

name: Publish ACA-Py Image (Indy)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Gather image info
id: info
run: |
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
- 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@v2

- name: Log in to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Image Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
tags: |
type=raw,value=py${{ matrix.python-version }}-indy-${{ env.INDY_VERSION }}-${{ inputs.tag || github.event.release.tag_name }}
- name: Build and Push Image to ghcr.io
uses: docker/build-push-action@v3
with:
push: true
context: .
file: docker/Dockerfile.indy
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: main
build-args: |
python_version=${{ matrix.python-version }}
indy_version=${{ env.INDY_VERSION }}
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Images do not include support for the linux/arm64 platform due to a known issue compiling the postgres plugin
# - https://github.com/hyperledger/indy-sdk/issues/2445
# There is a pending PR to fix this issue here; https://github.com/hyperledger/indy-sdk/pull/2453
platforms: linux/amd64,linux/386

# 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
81 changes: 81 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Publish ACA-Py Image
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image
on:
release:
types: [released]

workflow_dispatch:
inputs:
tag:
description: 'Image tag'
required: true
type: string

jobs:
publish-image:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.9']

name: Publish ACA-Py Image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Gather image info
id: info
run: |
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
- 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@v2

- name: Log in to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Image Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
tags: |
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
- name: Build and Push Image to ghcr.io
uses: docker/build-push-action@v3
with:
push: true
context: .
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: main
build-args: |
python_version=${{ matrix.python-version }}
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
platforms: linux/amd64,linux/arm64,linux/386

# 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
32 changes: 16 additions & 16 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/tests-indy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
${{ runner.os }}-buildx-test-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build test image
uses: docker/build-push-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
hooks:
- id: black
stages: [commit]
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/pycqa/flake8.git
rev: 3.9.0
hooks:
- id: flake8
Expand Down
Loading

0 comments on commit 46a6dae

Please sign in to comment.