Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

feat: update Data Integirty error handling (#3628) #9780

feat: update Data Integirty error handling (#3628)

feat: update Data Integirty error handling (#3628) #9780

Workflow file for this run

#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
name: build
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
jobs:
unitTest:
name: Unit test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-22.04, macOS-10.15]
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- uses: actions/checkout@v3
- name: Skip tests that require Docker on macOS (issue-2183)
if: matrix.os == 'macOS-10.15'
run: echo "SKIP_DOCKER=true" >> $GITHUB_ENV
- name: Run unit test
timeout-minutes: 15
run: make unit-test
- name: Upload coverage to Codecov
timeout-minutes: 10
if: matrix.os == 'ubuntu-22.04' && github.repository == 'hyperledger/aries-framework-go'
uses: codecov/[email protected]
with:
file: ./coverage.out
unitTestUrsa:
name: Unit test (Ursa/CL)
runs-on: ubuntu-22.04
container:
image: ghcr.io/hyperledger/ursa-wrapper-go/uwg-build # a container with libursa installed
timeout-minutes: 15
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- uses: actions/checkout@v3
- name: Run unit test (Ursa/CL)
timeout-minutes: 15
run: make unit-test-ursa
unitTestMobile:
name: Unit test (mobile)
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- uses: actions/checkout@v3
- name: Run unit test
timeout-minutes: 15
run: make unit-test-mobile
unitTestWasm:
name: Unit test wasm
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- uses: actions/checkout@v3
- name: Run unit test wasm
timeout-minutes: 10
run: make unit-test-wasm
bddTest:
name: BDD test
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 12.14.x
registry-url: "https://npm.pkg.github.com"
- uses: actions/checkout@v3
- name: Run BDD test
timeout-minutes: 45
run: |
make bdd-test
- uses: actions/upload-artifact@v2
if: always()
with:
name: logs
path: test/bdd/docker-compose.log
repoLint:
name: repolint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: repolinter
uses: philips-labs/[email protected]
env:
CUSTOM_REPOLINT_FILE: .repolint.json
checks:
name: Checks
timeout-minutes: 10
runs-on: ubuntu-22.04
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
- uses: actions/checkout@v3
- name: Run checks
timeout-minutes: 10
run: make license lint-core generate-openapi-spec
lintComponents:
name: Lint Components
timeout-minutes: 10
runs-on: ubuntu-22.04
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
- uses: actions/checkout@v3
- name: Run lint
timeout-minutes: 10
run: make lint-components
publish:
name: Publish images and npm packages
if: github.event_name == 'push' && ((github.repository == 'hyperledger/aries-framework-go' && github.ref == 'refs/heads/main') || (github.repository != 'hyperledger/aries-framework-go' && github.ref == 'refs/heads/afg-publish'))
needs: [repoLint, checks, lintComponents, unitTest, unitTestWasm, bddTest]
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Setup Go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'
id: go
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 12.14.x
registry-url: "https://npm.pkg.github.com"
- uses: actions/checkout@v3
- name: Publish docker images
run: |
function logout {
docker logout ghcr.io
}
trap logout EXIT
source .github/workflows/version_var.sh
if [ "${IS_RELEASE}" = true ] || [ "${GITHUB_REF}" = "refs/heads/afg-publish" ]; then
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ secrets.CR_USER }} --password-stdin
make agent-rest-docker
docker tag aries-framework-go/agent-rest:latest ghcr.io/${GITHUB_REPOSITORY}:$AGENT_IMAGE_TAG
docker push ghcr.io/${GITHUB_REPOSITORY}:$AGENT_IMAGE_TAG
fi
- name: Publish npm packages
working-directory: ./cmd/aries-js-worker
run: |
source ../../.github/workflows/version_var.sh
if [ "${IS_RELEASE}" = true ] || [ "${GITHUB_REF}" = "refs/heads/afg-publish" ]; then
sed -i 's/"version": "0.0.1"/"version": "'$NPM_PKG_TAG'"/g' package.json
sed -i 's#"name": "@hyperledger/aries-framework-go"#"name": "@'${GITHUB_REPOSITORY}'"#g' package.json
sed -i 's#"url": "git://github.com/hyperledger/aries-framework-go.git"#"url": "git://github.com/'${GITHUB_REPOSITORY}'.git"#g' package.json
npm install
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}