Skip to content

Commit

Permalink
Merge branch 'main' into feat/didcommv2-proof-of-concept
Browse files Browse the repository at this point in the history
Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
  • Loading branch information
mepeltier committed Jun 4, 2024
2 parents 3b0c966 + 42ac9c3 commit 6a8e140
Show file tree
Hide file tree
Showing 74 changed files with 1,984 additions and 676 deletions.
4 changes: 0 additions & 4 deletions .codecov.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/actions/run-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
TEST_SCOPE:
description: "Set of flags that defines the test scope"
required: false
default: "-t @GHA"
default: "-t @PR"
IN_LEDGER_URL:
description: "URL to the von network ledger browser"
required: false
Expand All @@ -27,7 +27,7 @@ runs:
PUBLIC_TAILS_URL: ${{ inputs.IN_PUBLIC_TAILS_URL }}
LOG_LEVEL: warning
NO_TTY: "1"
working-directory: acapy/demo
working-directory: ./demo
branding:
icon: "mic"
color: "purple"
55 changes: 55 additions & 0 deletions .github/actions/run-unit-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run Unit Tests
description: "Run unit tests for the project"

inputs:
python-version:
description: "Python version"
required: true
os:
description: "Operating system"
required: true
is_pr:
description: "Is this a PR?"
required: false
default: "true"

runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements*.txt'
- name: Install the project dependencies
shell: bash
run: |
pip install poetry
poetry install --all-extras
- name: Tests
shell: bash
run: |
poetry run pytest --cov=aries_cloudagent --cov-report term-missing --cov-report xml --ignore-glob=/tests/* --ignore-glob=demo/* --ignore-glob=docker/* --ignore-glob=docs/* --ignore-glob=scripts/* 2>&1 | tee pytest.log
PYTEST_EXIT_CODE=${PIPESTATUS[0]}
if grep -Eq "RuntimeWarning: coroutine .* was never awaited" pytest.log; then
echo "Failure: Detected unawaited coroutine warning in pytest output."
exit 1
fi
exit $PYTEST_EXIT_CODE
- name: Save PR number to file
if: inputs.is_pr == 'true'
shell: bash
run: echo ${{ github.event.number }} > PR_NUMBER
- name: Archive PR number
if: inputs.is_pr == 'true'
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER
- name: Archive Test Results
if: inputs.is_pr == 'true'
uses: actions/upload-artifact@v4
with:
name: TEST_COV
path: test-reports/coverage.xml
228 changes: 224 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,230 @@ updates:
# Maintain dependencies for GitHub Actions
# - Check for updates once a week
# - Group all updates into a single PR
- package-ecosystem: github-actions
directory: /
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
interval: "weekly"
groups:
all-actions:
patterns: [ "*" ]
patterns: [ "*" ]

# Maintain dependencies for Python Packages
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Maintain dependencies for Python Packages
- package-ecosystem: "pip"
directory: "/demo/playground/examples"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Maintain dependencies for Python Packages
- package-ecosystem: "pip"
directory: "/demo"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Maintain dependencies for Python Packages
- package-ecosystem: "pip"
directory: "/docs"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/docker-agent"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/docker-test/db"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/elasticsearch"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/curator"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/enterprise-search"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/filebeat"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/fleet"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/heartbeat"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/logspout"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/extensions/metricbeat"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/kibana"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/logstash"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/elk-stack/setup"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/multi-demo"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/playground"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/demo/playground/examples"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

# Maintain dependencies for dev Container
- package-ecosystem: "devcontainers"
directory: "/.devcontainer"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
timezone: "Canada/Pacific"

50 changes: 40 additions & 10 deletions .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: acapy-integration-tests

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:
branches:
Expand All @@ -18,17 +20,45 @@ jobs:
test:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
outputs:
is_release: ${{ steps.check_if_release.outputs.is_release }}
steps:
- name: checkout-acapy
uses: actions/checkout@v4
with:
path: acapy
#- name: run-von-network
# uses: ./acapy/.github/actions/run-von-network
#- name: run-indy-tails-server
# uses: ./acapy/.github/actions/run-indy-tails-server
- name: 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"
fetch-depth: 0
- name: Check if PR is a release
id: check_if_release
continue-on-error: true
run: |
# Get the diff between the current commit and the last merge commit on the upstream/main branch
git remote add upstream https://github.com/hyperledger/aries-cloudagent-python.git
git fetch upstream
last_merge=$(git rev-list --no-merges -n 1 upstream/main)
echo event = ${{ github.event_name }}
echo last upstream commit = "$last_merge"
echo current pr commit = "${{ github.sha }}"
echo Will exit with code 1 if the pull request is not a release
changes=$(git diff "${{ github.sha }}" "$last_merge" pyproject.toml)
# Extract the version of aries-cloudagent from the diff of pyproject.toml
version=$(echo "$changes" | grep -A1 'name = "aries_cloudagent"' | head -n 2 | tail -n 1 | awk '{print $3}' | tr -d '"')
echo "$version"
if [ "$version" ]; then
echo "This is a release because the aries-cloudagent version in pyproject.toml has changes"
echo is_release=true >> $GITHUB_OUTPUT
fi
- name: run-pr-integration-tests
uses: ./.github/actions/run-integration-tests
if: (steps.check_if_release.outputs.is_release != 'true' && github.event_name == 'pull_request')
- name: run-release-or-cron-integration-tests
if: (steps.check_if_release.outputs.is_release == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
uses: ./.github/actions/run-integration-tests
with:
TEST_SCOPE: "-t @Release"
Loading

0 comments on commit 6a8e140

Please sign in to comment.