ci: cache less things to make it more efficient
also removes the jobs for testing with Rust beta and nightly
This commit is contained in:
36
.github/workflows/ci.yaml
vendored
36
.github/workflows/ci.yaml
vendored
@@ -54,8 +54,6 @@ jobs:
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -81,8 +79,6 @@ jobs:
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -132,13 +128,13 @@ jobs:
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2.5.1
|
||||
with:
|
||||
save-if: "${{ github.event_name != 'pull_request' }}"
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -193,6 +189,8 @@ jobs:
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2.5.1
|
||||
with:
|
||||
save-if: "${{ github.event_name != 'pull_request' }}"
|
||||
|
||||
- name: Run clippy
|
||||
run: |
|
||||
@@ -200,21 +198,13 @@ jobs:
|
||||
|
||||
|
||||
test:
|
||||
name: Run test suite with Rust ${{ matrix.toolchain }}
|
||||
name: Run test suite with Rust stable
|
||||
needs: [rustfmt, opa-lint]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false # Continue other jobs if one fails to help filling the cache
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: docker.io/library/postgres:15.3
|
||||
@@ -236,15 +226,13 @@ jobs:
|
||||
|
||||
- name: Install toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ matrix.toolchain }}
|
||||
rustup default ${{ matrix.toolchain }}
|
||||
rustup toolchain install stable
|
||||
rustup default stable
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -265,6 +253,8 @@ jobs:
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2.5.1
|
||||
with:
|
||||
save-if: "${{ github.event_name != 'pull_request' }}"
|
||||
|
||||
- name: Test
|
||||
id: test
|
||||
@@ -274,14 +264,6 @@ jobs:
|
||||
run: |
|
||||
cargo test --workspace
|
||||
|
||||
# Ignore errors on the nightly toolchain
|
||||
continue-on-error: "${{ matrix.toolchain == 'nightly' }}"
|
||||
|
||||
- name: Emit error annotation on failures
|
||||
if: steps.test.outcome == 'failure'
|
||||
run: |
|
||||
echo "::error ::Test suite failed on ${{ matrix.toolchain }} toolchain"
|
||||
|
||||
|
||||
build-image:
|
||||
name: Build and push Docker image
|
||||
|
||||
6
.github/workflows/coverage.yaml
vendored
6
.github/workflows/coverage.yaml
vendored
@@ -56,8 +56,6 @@ jobs:
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -109,8 +107,6 @@ jobs:
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -131,6 +127,8 @@ jobs:
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2.5.1
|
||||
with:
|
||||
save-if: "${{ github.event_name != 'pull_request' }}"
|
||||
|
||||
- name: Download grcov
|
||||
run: |
|
||||
|
||||
4
.github/workflows/docs.yaml
vendored
4
.github/workflows/docs.yaml
vendored
@@ -29,6 +29,8 @@ jobs:
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: Swatinem/rust-cache@v2.5.1
|
||||
with:
|
||||
save-if: "${{ github.event_name != 'pull_request' }}"
|
||||
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v1.2.0
|
||||
@@ -39,8 +41,6 @@ jobs:
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Build the documentation
|
||||
run: sh misc/build-docs.sh
|
||||
|
||||
Reference in New Issue
Block a user