Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update Github workflows #1500

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Skip unncecessary folders
node_modules
build
.github
34 changes: 0 additions & 34 deletions .github/actions/setup-node/action.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#################################
# GitHub Dependabot Config info #
#################################

version: 2
updates:
# Maintain dependencies for NPM
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
allow:
# Focus on main dependencies, not devDependencies
- dependency-type: 'production'

# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'

# Maintain dependencies for Docker
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'monthly'

# Maintain dependencies for Cargo
- package-ecosystem: 'cargo'
directory: '/'
schedule:
interval: 'monthly'
16 changes: 16 additions & 0 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Repositories have 10 GB of cache storage per repository
# Documentation: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
name: 'Cleanup - Cache'
on:
schedule:
- cron: '0 0 * * 0/3'
workflow_dispatch:

jobs:
delete-caches:
name: 'Delete Actions caches'
runs-on: ubuntu-latest

steps:
- name: 'Wipe Github Actions cache'
uses: easimon/wipe-cache@v2
35 changes: 0 additions & 35 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

18 changes: 12 additions & 6 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ on:
branches:
- main

env:
NODE_OPTIONS: --max_old_space_size=6144

jobs:
release-canary:
runs-on: aries-ubuntu-2004
name: Release Canary
if: "!startsWith(github.event.head_commit.message, 'chore(release): v')"
steps:
- name: Checkout aries-framework-javascript
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# pulls all commits (needed for lerna to correctly version)
fetch-depth: 0
persist-credentials: false

# setup dependencies
- name: Setup Libindy
uses: ./.github/actions/setup-libindy

- name: Setup NodeJS
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -43,7 +48,7 @@ jobs:
run: |
LAST_RELEASED_VERSION=$(npm view @aries-framework/core@alpha version)

echo "::set-output name=version::$LAST_RELEASED_VERSION"
echo version="${LAST_RELEASED_VERSION}" >> "$GITHUB_OUTPUT"

- name: Setup git user
run: |
Expand All @@ -62,16 +67,17 @@ jobs:
if: "startsWith(github.event.head_commit.message, 'chore(release): v')"
steps:
- name: Checkout aries-framework-javascript
uses: actions/checkout@v2
uses: actions/checkout@v3

# setup dependencies
- name: Setup Libindy
uses: ./.github/actions/setup-libindy

- name: Setup NodeJS
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -82,7 +88,7 @@ jobs:
NEW_VERSION=$(node -p "require('./lerna.json').version")
echo $NEW_VERSION

echo "::set-output name=version::$NEW_VERSION"
echo version="${NEW_VERSION}" >> "$GITHUB_OUTPUT"

- name: Create Tag
uses: mathieudutour/github-tag-action@v6.0
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ env:
ENDORSER_AGENT_PUBLIC_DID_SEED: 00000000000000000000000Endorser9
GENESIS_TXN_PATH: network/genesis/local-genesis.txn
LIB_INDY_STRG_POSTGRES: /home/runner/work/aries-framework-javascript/indy-sdk/experimental/plugins/postgres_storage/target/release # for Linux
NODE_OPTIONS: --max_old_space_size=4096
NODE_OPTIONS: --max_old_space_size=6144

# Make sure we're not running multiple release steps at the same time as this can give issues with determining the next npm version to release.
# Ideally we only add this to the 'release' job so it doesn't limit PR runs, but github can't guarantee the job order in that case:
# "When concurrency is specified at the job level, order is not guaranteed for jobs or runs that queue within 5 minutes of each other."
concurrency:
group: aries-framework-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}
# Cancel previous runs that are not completed yet
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -43,26 +44,27 @@ jobs:
fi

echo "SHOULD_RUN: ${SHOULD_RUN}"
echo "::set-output name=triggered::${SHOULD_RUN}"
echo triggered="${SHOULD_RUN}" >> "$GITHUB_OUTPUT"

validate:
runs-on: aries-ubuntu-2004
name: Validate
steps:
- name: Checkout aries-framework-javascript
uses: actions/checkout@v2
uses: actions/checkout@v3

# setup dependencies
- name: Setup Libindy
uses: ./.github/actions/setup-libindy

- name: Setup NodeJS
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Linting
run: yarn lint
Expand All @@ -86,7 +88,7 @@ jobs:

steps:
- name: Checkout aries-framework-javascript
uses: actions/checkout@v2
uses: actions/checkout@v3

# setup dependencies

Expand All @@ -109,16 +111,17 @@ jobs:
uses: ./.github/actions/setup-postgres-wallet-plugin

- name: Setup NodeJS
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Add ref-napi resolution in Node18
run: node ./scripts/add-ref-napi-resolution.js
if: matrix.node-version == '18.x'
run: node ./scripts/add-ref-napi-resolution.js

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Run tests
run: TEST_AGENT_PUBLIC_DID_SEED=${TEST_AGENT_PUBLIC_DID_SEED} ENDORSER_AGENT_PUBLIC_DID_SEED=${ENDORSER_AGENT_PUBLIC_DID_SEED} GENESIS_TXN_PATH=${GENESIS_TXN_PATH} yarn test --coverage --forceExit --bail
Expand All @@ -133,19 +136,21 @@ jobs:
if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch'
steps:
- name: Checkout aries-framework-javascript
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# pulls all commits (needed for lerna to correctly version)
fetch-depth: 0
persist-credentials: false

# setup dependencies
- name: Setup Libindy
uses: ./.github/actions/setup-libindy

- name: Setup NodeJS
uses: ./.github/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -174,8 +179,7 @@ jobs:
run: |
NEW_VERSION=$(node -p "require('./lerna.json').version")
echo $NEW_VERSION

echo "::set-output name=version::$NEW_VERSION"
echo version="${NEW_VERSION}" >> "$GITHUB_OUTPUT"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- uses: amannn/action-semantic-pull-request@v3.4.6
- uses: amannn/action-semantic-pull-request@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/repolinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
container: ghcr.io/todogroup/repolinter:v0.10.1
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Lint Repo
run: bundle exec /app/bin/repolinter.js --rulesetUrl https://raw.githubusercontent.com/hyperledger-labs/hyperledger-community-management-tools/master/repo_structure/repolint.json
Loading
Loading