-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squash merge upstream/main into feat/pagination-ordering
Signed-off-by: ff137 <[email protected]>
- Loading branch information
Showing
2,077 changed files
with
99,497 additions
and
96,155 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
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: Check if PR is a release | ||
description: "Checks if the PR is a release" | ||
|
||
outputs: | ||
is_release: | ||
description: "Is this a release?" | ||
value: ${{ steps.check_if_release.outputs.is_release }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check if PR is a release | ||
shell: bash | ||
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/openwallet-foundation/acapy.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 acapy-agent from the diff of pyproject.toml | ||
version=$(echo "$changes" | grep -A1 'name = "acapy_agent"' | head -n 2 | tail -n 1 | awk '{print $3}' | tr -d '"') | ||
echo "$version" | ||
if [ "$version" ]; then | ||
echo "This is a release because the acapy-agent version in pyproject.toml has changes" | ||
echo is_release=true >> $GITHUB_OUTPUT | ||
fi |
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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
name: BDD Interop Integration Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -17,30 +20,67 @@ defaults: | |
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request') | ||
# Run on openwallet-foundation and non-draft PRs or on non-PR events | ||
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request')) | ||
outputs: | ||
is_release: ${{ steps.check_if_release.outputs.is_release }} | ||
steps: | ||
- name: checkout-acapy | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check changed files | ||
id: check-changed-files | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files_yaml: | | ||
src: | ||
- acapy_agent/**/* | ||
- poetry.lock | ||
- pyproject.toml | ||
- name: Check if src files changed | ||
id: check-if-src-changed | ||
run: | | ||
if [ "${{ steps.check-changed-files.outputs.src_any_changed }}" != "true" ] && [ '${{ github.event_name }}' == 'pull_request' ]; then | ||
echo "No src files changed..." | ||
echo run_tests=false >> $GITHUB_OUTPUT | ||
fi | ||
- name: Check if PR is a release | ||
if: steps.check-if-src-changed.outputs.run_tests != 'false' | ||
uses: ./.github/actions/is-release | ||
id: check_if_release | ||
- name: Request GitHub API for PR data | ||
if: steps.check-if-src-changed.outputs.run_tests != 'false' | ||
uses: octokit/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
id: get_pr_data | ||
with: | ||
route: GET /repos/${{ github.event.repository.full_name }}/pulls/${{ github.event.number }} | ||
- name: Run BDD Interop Tests | ||
- name: Prepare Interop Tests | ||
if: steps.check-if-src-changed.outputs.run_tests != 'false' | ||
run: | | ||
# Get AATH | ||
git clone https://github.com/hyperledger/aries-agent-test-harness.git | ||
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }} | ||
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.ref }} | ||
sed -i 's|@git+https://github.com/hyperledger/aries-cloudagent-python@main|@git+${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}@${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}|g' ./aries-agent-test-harness/aries-backchannels/acapy/requirements-main.txt | ||
cat aries-agent-test-harness/aries-backchannels/acapy/requirements-main.txt | ||
cd aries-agent-test-harness | ||
git clone https://github.com/openwallet-foundation/owl-agent-test-harness.git | ||
# Change fork and branch for pull requests | ||
if [ ${{ github.event_name }} == 'pull_request' ]; then | ||
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }} | ||
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.ref }} | ||
sed -i 's|@git+https://github.com/openwallet-foundation/acapy@main|@git+${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}@${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}|g' ./owl-agent-test-harness/aries-backchannels/acapy/requirements-main.txt | ||
fi | ||
cat owl-agent-test-harness/aries-backchannels/acapy/requirements-main.txt | ||
cd owl-agent-test-harness | ||
./manage build -a acapy-main | ||
- name: Run PR Interop Tests | ||
if: (steps.check_if_release.outputs.is_release != 'true' && github.event_name == 'pull_request' && steps.check-if-src-changed.outputs.run_tests != 'false') | ||
run: | | ||
cd owl-agent-test-harness | ||
NO_TTY=1 LEDGER_URL_CONFIG=http://test.bcovrin.vonx.io TAILS_SERVER_URL_CONFIG=https://tails.vonx.io ./manage run -d acapy-main -t @critical -t ~@wip -t ~@T004-RFC0211 -t ~@DidMethod_orb -t ~@Transport_NoHttpOutbound | ||
- name: Run Release or Nightly Interop Tests | ||
if: (steps.check_if_release.outputs.is_release == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && steps.check-if-src-changed.outputs.run_tests != 'false') | ||
run: | | ||
cd owl-agent-test-harness | ||
NO_TTY=1 LEDGER_URL_CONFIG=http://test.bcovrin.vonx.io TAILS_SERVER_URL_CONFIG=https://tails.vonx.io ./manage run -d acapy-main -t @AcceptanceTest -t ~@wip -t ~@T004-RFC0211 -t ~@DidMethod_orb -t ~@Transport_NoHttpOutbound | ||
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
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
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
Oops, something went wrong.