-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ci): composite the action (#120)
* refactor(ci): composite the action Signed-off-by: mateonunez <[email protected]> * perf(ci): implement healthcheck Signed-off-by: mateonunez <[email protected]> --------- Signed-off-by: mateonunez <[email protected]>
- Loading branch information
1 parent
8610ddc
commit a3c939d
Showing
2 changed files
with
25 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,105 +12,41 @@ jobs: | |
setup-dependencies: | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18, 20] | ||
node: [18, 20] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
node-version: ${{matrix.node}} | ||
cache: 'pnpm' | ||
- run: pnpm fetch | ||
|
||
ci-cli: | ||
package-tests: | ||
needs: setup-dependencies | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18] | ||
node: [18, 20] | ||
package: [cli, drill, falcon, huston, rover] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
node-version: ${{matrix.node}} | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: cd packages/cli && pnpm test | ||
|
||
ci-drill: | ||
needs: setup-dependencies | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- run: docker-compose up -d | ||
- run: pnpm install | ||
- run: sleep 10 | ||
- run: cd packages/drill && pnpm test | ||
|
||
ci-falcon: | ||
needs: setup-dependencies | ||
runs-on: ${{matrix.os}} | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- run: docker-compose up -d | ||
- run: pnpm install | ||
- run: sleep 10 | ||
- run: cd packages/falcon && pnpm test | ||
|
||
ci-huston: | ||
needs: setup-dependencies | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: cd packages/huston && pnpm test | ||
|
||
ci-rover: | ||
needs: setup-dependencies | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16, 18] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: cd packages/rover && pnpm test | ||
- name: Wait for databases to be healthy | ||
run: | | ||
while [ "$(docker-compose ps mysql | grep '(healthy)')" == "" ] || [ "$(docker-compose ps postgres | grep '(healthy)')" == "" ]; do | ||
echo "Waiting for databases to be healthy..." | ||
sleep 5 | ||
done | ||
- run: cd packages/${{matrix.package}} && pnpm test |
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