diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml index a3fc04919..b07098234 100644 --- a/.github/workflows/build_latest.yml +++ b/.github/workflows/build_latest.yml @@ -1,20 +1,13 @@ name: Build Latest on: - push: - branches: ["main"] - paths: - - "Cargo.toml" - - "Cargo.lock" - - "src/**" - - "parser/**" - - "site/**" - - "pad/**" - - "tests*/**" - - "changelog.md" - - "readme.md" - - ".github/workflows/build_latest.yml" - + workflow_run: + workflows: + - Validate + types: + - completed + branches: + - main env: CARGO_TERM_COLOR: always @@ -26,35 +19,9 @@ concurrency: cancel-in-progress: true jobs: - # Test the interpreter - test_bin: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: target - key: build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} - restore-keys: | - build-${{ runner.os }}- - - name: Run interpreter tests - run: cargo test --lib - # Test the site - test_site: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: target - key: build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} - restore-keys: | - build-${{ runner.os }}- - - name: Run site tests - run: cargo test -p site # Build the site build_site: - needs: test_site + if: ${{ github.event.workflow_run.conclusion == "success" }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -94,7 +61,7 @@ jobs: # Create the release without assets create_release: name: Create release - needs: [test_bin, build_site] + needs: [build_site] runs-on: ubuntu-latest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -114,7 +81,7 @@ jobs: # Create the binaries and upload them as release assets create_binaries: name: Create binary - needs: [test_bin, create_release] + needs: [create_release] runs-on: ${{ matrix.os }} env: BINARY_EXT: ${{ matrix.os == 'windows-latest' && '.exe' || '' }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 0b77d3e71..c0874e787 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,33 +1,10 @@ name: Validate on: - push: - branches: ["main"] - paths: - - "Cargo.toml" - - "Cargo.lock" - - "src/**" - - "parser/**" - - "site/**" - - "pad/**" - - "tests*/**" - - "changelog.md" - - "readme.md" - - ".github/workflows/validate.yml" pull_request: - branches: ["main"] - paths: - - "Cargo.toml" - - "Cargo.lock" - - "src/**" - - "parser/**" - - "site/**" - - "pad/**" - - "tests*/**" - - "changelog.md" - - "readme.md" - - ".github/workflows/validate.yml" - + push: + branches-ignore: + - site env: CARGO_TERM_COLOR: always @@ -51,3 +28,5 @@ jobs: run: rustup target add wasm32-unknown-unknown - name: Check feature combinations run: cargo run ./.github/features.ua + - name: Run tests + run: cargo test --workspace --no-fail-fast --all-targets --all-features