From df66ecd7522779069327a681336e781927d2b23c Mon Sep 17 00:00:00 2001 From: Praveen Perera Date: Sun, 17 Apr 2022 14:43:48 -0400 Subject: [PATCH] Build web-admin before running clippy or build * Run with latest node LTS (v16) * Set `CI=false` to prevent npm build warnings from ending CI run --- .github/workflows/cd.yml | 12 +++++++++++- .github/workflows/ci.yml | 23 +++++++++++++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 49314aa..45e66b3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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: @@ -85,6 +94,7 @@ jobs: macos: runs-on: macos-latest + needs: build-web-admin strategy: matrix: target: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9851bfc..a4b3044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 }} @@ -88,6 +98,7 @@ jobs: macos: runs-on: macos-latest + needs: build-web-admin strategy: fail-fast: true matrix: @@ -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 @@ -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