-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a16dadf
commit 684826c
Showing
3 changed files
with
110 additions
and
33 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 |
---|---|---|
|
@@ -18,36 +18,22 @@ on: | |
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test_configuration: | ||
name: Lint, Typecheck and Test | ||
checkout_dependencies: | ||
name: Checkout RatOS Configurator | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Rat-OS/RatOS-configuration | ||
path: "ratos-configuration" | ||
|
||
- name: Fetch Configurator Repository | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Rat-OS/RatOS-configurator | ||
path: "ratos-configurator" | ||
ref: ${{ github.ref_name }} | ||
|
||
- name: Fetch Klipper Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: klipper3d/klipper | ||
path: "klipper" | ||
|
||
- name: Fetch Klipper Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Arksine/moonraker | ||
path: "moonraker" | ||
|
||
- name: Setup Node.js environment | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0. | ||
|
@@ -60,39 +46,122 @@ jobs: | |
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
- name: get pnpm store | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
name: pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
path: | | ||
${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
'ratos-configuration' | ||
'klipper' | ||
'moonraker' | ||
'**/node_modules' | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install all dependencies | ||
- name: Dependencies | ||
working-directory: ratos-configurator/src | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
- name: Checkout RatOS Configuration | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Rat-OS/RatOS-configuration | ||
path: "ratos-configuration" | ||
|
||
- name: Checkout Klipper | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: klipper3d/klipper | ||
path: "klipper" | ||
|
||
- name: Checkout Moonraker | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Arksine/moonraker | ||
path: "moonraker" | ||
|
||
lint: | ||
name: Lint | ||
needs: [checkout_dependencies] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Rat-OS/RatOS-configurator | ||
path: "ratos-configurator" | ||
- uses: actions/cache@v3 | ||
name: Restore Cache | ||
with: | ||
path: | | ||
${{ needs.checkout_dependencies.outputs.STORE_PATH }} | ||
'**/node_modules' | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Begin CI... | ||
working-directory: ratos-configurator/src | ||
run: pnpm run lint:ci | ||
|
||
- name: TypeScript report | ||
typecheck: | ||
needs: [checkout_dependencies] | ||
name: Typecheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Rat-OS/RatOS-configurator | ||
path: "ratos-configurator" | ||
- uses: actions/cache@v3 | ||
name: Restore Cache | ||
with: | ||
path: | | ||
${{ needs.checkout_dependencies.outputs.STORE_PATH }} | ||
'**/node_modules' | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Begin CI... | ||
uses: fersilva16/[email protected] | ||
with: | ||
project: ratos-configurator/src/tsconfig.json | ||
|
||
- name: Test | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
needs: [checkout_dependencies] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Rat-OS/RatOS-configurator | ||
path: "ratos-configurator" | ||
- uses: actions/cache@v3 | ||
name: Restore Cache | ||
with: | ||
path: | | ||
${{ needs.checkout_dependencies.outputs.STORE_PATH }} | ||
'**/node_modules' | ||
'ratos-configuration' | ||
'klipper' | ||
'moonraker' | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Begin CI... | ||
working-directory: ratos-configurator/src | ||
if: success() || failure() # run this step even if previous step failed | ||
run: pnpm run test:ci --outputFile=./report.xml | ||
|
||
- name: Upload Reports | ||
- name: Upload reports | ||
uses: actions/upload-artifact@v3 # upload test results | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
|
@@ -101,6 +170,6 @@ jobs: | |
ratos-configurator/src/report.xml | ||
ratos-configurator/src/eslint_report.json | ||
- name: Check Failure | ||
- name: Report status | ||
if: ${{ failure() }} | ||
run: exit 1 |
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