Skip to content
Open
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
66 changes: 41 additions & 25 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Node Build
on:
workflow_dispatch:
schedule:
- cron: '0 21 * * *'
- cron: "0 21 * * *"
pull_request:
branches:
- '**'
- "**"
push:
branches:
- main
Expand All @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- run: pnpm checks
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- run: pnpm checks

backend:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: fail if GraphQL was generated
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: exit 1

codeql-analyze:
runs-on: ubuntu-latest
needs: prerequisite
Expand All @@ -153,20 +153,20 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
config:
- './.github/codeql/source.yml'
- './.github/codeql/tests.yml'
- "./.github/codeql/source.yml"
- "./.github/codeql/tests.yml"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ${{ matrix.config }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ${{ matrix.config }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

integration-test:
runs-on: ubuntu-22.04
Expand All @@ -186,8 +186,10 @@ jobs:
run: |
echo "127.0.0.1 cloud-nine-wallet-test-backend" | sudo tee -a /etc/hosts
echo "127.0.0.1 cloud-nine-wallet-test-auth" | sudo tee -a /etc/hosts
echo "127.0.0.1 cloud-nine-wallet-test-card-service" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-backend" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-auth" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-point-of-sale" | sudo tee -a /etc/hosts
- name: Build dependencies
run: pnpm --filter integration build:deps

Expand All @@ -214,9 +216,11 @@ jobs:
- name: Setup hosts
run: |
echo "127.0.0.1 cloud-nine-wallet-test-backend" | sudo tee -a /etc/hosts
echo "127.0.0.1 cloud-nine-wallet-test-card-service" | sudo tee -a /etc/hosts
echo "127.0.0.1 cloud-nine-wallet-test-auth" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-backend" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-auth" | sudo tee -a /etc/hosts
echo "127.0.0.1 happy-life-bank-test-point-of-sale" | sudo tee -a /etc/hosts

- name: Build dependencies
run: pnpm --filter performance build:deps
Expand Down Expand Up @@ -338,8 +342,20 @@ jobs:
node-build:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [auth, backend, frontend, token-introspection, card-service, point-of-sale, mock-account-servicing-entity, graphql, codeql-analyze, integration-test]
steps:
needs:
[
auth,
backend,
frontend,
token-introspection,
card-service,
point-of-sale,
mock-account-servicing-entity,
graphql,
codeql-analyze,
integration-test,
]
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- run: pnpm build
Expand Down Expand Up @@ -453,7 +469,7 @@ jobs:
with:
path: /tmp/${{ github.sha }}-${{ matrix.package }}-${{ matrix.platform.name }}-${{ needs.version-generator.outputs.version }}.tar
key: ${{ github.sha }}-${{ matrix.package }}-${{ matrix.platform.name }}-${{ needs.version-generator.outputs.version }}

docker-grype:
name: Docker Grype Scan
needs: [version-generator, docker-build]
Expand Down Expand Up @@ -553,10 +569,10 @@ jobs:
platform_name: ${{ matrix.platform.name }}
version: ${{ needs.version-generator.outputs.version }}
gh_token: ${{ secrets.GITHUB_TOKEN }}

push-manifest:
name: Push multi-arch manifest list
needs: [version-generator,push]
needs: [version-generator, push]
runs-on: ubuntu-latest
if: needs.version-generator.outputs.dockerPush == 'true'
strategy:
Expand All @@ -576,7 +592,7 @@ jobs:
package: ${{ matrix.package }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ needs.version-generator.outputs.version }}

generate-release:
runs-on: ubuntu-latest
needs: [push-manifest, version-generator]
Expand All @@ -597,7 +613,7 @@ jobs:
allowUpdates: true
draft: false
makeLatest: true
prerelease: endsWith(needs.version-generator.outputs.version, '-alpha')
prerelease: endsWith(needs.version-generator.outputs.version, '-alpha')
name: ${{ needs.version-generator.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
tag: ${{ needs.version-generator.outputs.version }}
Expand Down
Loading
Loading