Skip to content

Commit

Permalink
Build web-admin before running clippy or build
Browse files Browse the repository at this point in the history
* Run with latest node LTS (v16)
* Set `CI=false` to prevent npm build warnings from ending CI run
  • Loading branch information
praveenperera committed Apr 17, 2022
1 parent 3059d5a commit df66ecd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ jobs:
matrix:
platform: [linux-musl]

build-web-admin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: cd web-admin && npm install && CI=false npm run build

windows:
runs-on: windows-latest
needs: install-cross
needs: ["install-cross", "build-web-admin"]
strategy:
matrix:
target:
Expand Down Expand Up @@ -85,6 +94,7 @@ jobs:

macos:
runs-on: macos-latest
needs: build-web-admin
strategy:
matrix:
target:
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install stable toolchain with rustfmt available
uses: actions-rs/toolchain@v1
Expand All @@ -18,7 +18,17 @@ jobs:

- run: cargo fmt -- --check

build-web-admin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: cd web-admin && npm install && CI=false npm run build

clippy:
needs: build-web-admin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -60,9 +70,9 @@ jobs:
# some of the windows jobs could fill up the concurrent job queue before
# one of the install-cross jobs has started, so this makes sure all
# artifacts are downloaded first.
needs: install-cross
needs: ["install-cross", "build-web-admin"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
Expand All @@ -88,6 +98,7 @@ jobs:

macos:
runs-on: macos-latest
needs: build-web-admin
strategy:
fail-fast: true
matrix:
Expand All @@ -99,7 +110,7 @@ jobs:
#- aarch64-apple-darwin
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup | Rust
uses: actions-rs/toolchain@v1
Expand All @@ -119,9 +130,9 @@ jobs:

linux:
runs-on: ubuntu-latest
needs: install-cross
needs: ["install-cross", "build-web-admin"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50

Expand Down

0 comments on commit df66ecd

Please sign in to comment.