Skip to content

Commit

Permalink
Single workflow for packages (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcalderipe authored Mar 27, 2024
1 parent b39b2c7 commit fe42c33
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 225 deletions.
65 changes: 0 additions & 65 deletions .github/workflows/nestjs-shared.yml

This file was deleted.

39 changes: 24 additions & 15 deletions .github/workflows/signature.yml → .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: '@narval/signature CI'
name: Packages CI

on:
push:
paths:
- packages/signature/**
- .github/workflows/signature.yml
- packages/**
- .github/workflows/packages.yml
- jest.config.ts
- jest.preset.js
- .eslintrc.json
Expand All @@ -20,7 +20,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
Expand All @@ -31,26 +33,33 @@ jobs:
run: |
make install/ci
- name: Set base and head SHAs for nx affected
uses: nrwl/nx-set-shas@v3

# Needed for nx affected to work when CI is running on a PR.
- name: Track git main branch
run: |
git branch --track main origin/main
- name: Code format
shell: bash
run: |
make signature/format/check
make signature/lint/check
npx nx affected --target format:check lint:check --exclude tag:type:application
- name: Test types
shell: bash
run: |
make signature/test/type
npx nx affected --target test:type --exclude tag:type:application
- name: Test upstream application types
shell: bash
- name: Test unit
run: |
make policy-engine/test/type
npx nx affected --target test:unit --exclude tag:type:application
- name: Test unit
shell: bash
- name: Test integration
run: |
npx nx affected --target test:integration --exclude tag:type:application
- name: Test end-to-end
run: |
make signature/test/unit
npx nx affected --target test:e2e --exclude tag:type:application
- name: Send Slack notification on failure
if: failure() && github.ref == 'refs/heads/main'
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/policy-engine-shared.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/transaction-request-intent.yml

This file was deleted.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

| Project | Status |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [@app/armory](./apps/armory/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/armory.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/armory.yml/badge.svg?branch=main" alt="@app/armory CI status" /></a> |
| [@app/policy-engine](./apps/policy-engine/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/policy-engine.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/policy-engine.yml/badge.svg?branch=main" alt="@app/policy-engine CI status" /></a> |
| [@narval/encryption](./packages/encryption/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/encryption.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/encryption.yml/badge.svg?branch=main" alt="@narval/encryption CI status" /></a> |
| [@narval/nestjs-shared](./packages/nestjs-shared/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/nestjs-shared.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/nestjs-shared.yml/badge.svg?branch=main" alt="@narval/nestjs-shared CI status" /></a> |
| [@narval/policy-engine-shared](./packages/policy-engine-shared/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/policy-engine-shared.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/policy-engine-shared.yml/badge.svg?branch=main" alt="@narval/policy-engine-shared CI status" /></a> |
| [@narval/signature](./packages/signature/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/signature.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/signature.yml/badge.svg?branch=main" alt="@narval/signature CI status" /></a> |
| [@app/armory](./apps/armory/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/armory.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/armory.yml/badge.svg?branch=main" alt="@app/armory CI status" /></a> |
| [@app/policy-engine](./apps/policy-engine/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/policy-engine.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/policy-engine.yml/badge.svg?branch=main" alt="@app/policy-engine CI status" /></a> |
| [@narval/encryption](./packages/encryption/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/encryption.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/encryption.yml/badge.svg?branch=main" alt="@narval/encryption CI status" /></a> |
| [@narval/policy-engine-shared](./packages/policy-engine-shared/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/policy-engine-shared.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/policy-engine-shared.yml/badge.svg?branch=main" alt="@narval/policy-engine-shared CI status" /></a> |
| [@narval/signature](./packages/signature/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/signature.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/signature.yml/badge.svg?branch=main" alt="@narval/signature CI status" /></a> |
| [@narval/nestjs-shared](./packages/nestjs-shared/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/nestjs-shared.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/nestjs-shared.yml/badge.svg?branch=main" alt="@narval/nestjs-shared CI status" /></a> |
| [@narval/transaction-request-intent](./packages/transaction-request-intent/README.md) | <a href="https://github.com/narval-xyz/narval/actions/workflows/transaction-request-intent.yml" target="_blank"><img src="https://github.com/narval-xyz/narval/actions/workflows/transaction-request-intent.yml/badge.svg?branch=main" alt="@narval/transaction-request-intent CI status" /></a> |

## Getting started
Expand Down Expand Up @@ -63,7 +63,7 @@ npx nx g @nrwl/workspace:lib
# Generate an NestJS library.
npx nx g @nx/nest:library
# Generate an NestJS application.
npx nx g @nx/nest:application
npx nx g @nx/nest:application --tags type:application
```

For more information about code generation, please refer to the [NX
Expand Down
4 changes: 2 additions & 2 deletions apps/armory/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"test:type": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --noEmit --project apps/armory/tsconfig.app.json"
"command": "make armory/test/type"
}
},
"test:unit": {
Expand Down Expand Up @@ -91,5 +91,5 @@
}
}
},
"tags": []
"tags": ["type:application"]
}
2 changes: 1 addition & 1 deletion apps/devtool/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
}
}
},
"tags": []
"tags": ["type:application"]
}
2 changes: 1 addition & 1 deletion apps/documentation/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
}
}
},
"tags": []
"tags": ["type:application"]
}
4 changes: 2 additions & 2 deletions apps/policy-engine/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"test:type": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --noEmit --project apps/policy-engine/tsconfig.app.json"
"command": "make policy-engine/test/type"
}
},
"test:unit": {
Expand Down Expand Up @@ -78,5 +78,5 @@
}
}
},
"tags": []
"tags": ["type:application"]
}
4 changes: 2 additions & 2 deletions apps/vault/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"test:type": {
"executor": "nx:run-commands",
"options": {
"command": "npx tsc --noEmit --project apps/vault/tsconfig.app.json"
"command": "make vault/test/type"
}
},
"test:unit": {
Expand Down Expand Up @@ -77,5 +77,5 @@
}
}
},
"tags": []
"tags": ["type:application"]
}
2 changes: 1 addition & 1 deletion packages/config-module/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Config Module
# Config Module

A custom config module built on top of Nest's, better utilizing its options to
achieve more satisfying results in terms of user experience, tailored
Expand Down

0 comments on commit fe42c33

Please sign in to comment.