-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Main Workflow and Fix failing instalation on Linux (#602)
* Update workflow.yaml to include new jobs for checks, unit tests, build, and integration test * Update workflow.yaml * Update workflow.yaml to use relative path in the 'uses' field for the 'Run Integration Tests' job * Update workflow.yaml to use relative path for the 'Upload Artifact' job * Update workflow.yaml to rename the 'Run' job to 'Integration Tests' * Update and pin dependencies in workflow.yaml * Update workflow.yaml to include 'fail-fast: false' in the strategy matrix * Add Graphviz test to workflow.yaml * Add apt-get clean command before apt-get update and refactor unit tests * Refactor GraphvizInstaller to remove duplicate code and improve code readability * Refactor GraphvizInstaller * Fix format
- Loading branch information
Showing
6 changed files
with
228 additions
and
98 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
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
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 |
---|---|---|
@@ -1,26 +1,88 @@ | ||
name: Main workflow | ||
on: [push] | ||
jobs: | ||
run: | ||
name: Run | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
check: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Lint | ||
run: yarn lint | ||
- name: TypeCheck | ||
run: yarn typecheck | ||
|
||
unit-test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
needs: check | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- if: matrix.os != 'windows-latest' | ||
name: Lint | ||
run: yarn lint | ||
- name: Test | ||
run: yarn test | ||
- name: Build | ||
run: yarn build | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: check | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: lib | ||
path: lib | ||
|
||
integration-test: | ||
name: Integration Tests | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- build | ||
- unit-test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Download Artifact | ||
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6 | ||
- name: Run Integration Tests | ||
uses: ./ | ||
- name: Graphviz test | ||
run: dot -V |
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
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
Oops, something went wrong.