diff --git a/.github/workflows/check-examples.yml b/.github/workflows/check-examples.yml index 7064bcd8ac..e4bb1abb68 100644 --- a/.github/workflows/check-examples.yml +++ b/.github/workflows/check-examples.yml @@ -26,3 +26,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "check" + toolchain: nightly diff --git a/.github/workflows/check-stable.yml b/.github/workflows/check-stable.yml index 1ee2cc4f4c..39978eb718 100644 --- a/.github/workflows/check-stable.yml +++ b/.github/workflows/check-stable.yml @@ -2,50 +2,25 @@ name: Check stable on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] - -env: - CARGO_TERM_COLOR: always - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse + branches: + - main jobs: get-leptos-changed: uses: ./.github/workflows/get-leptos-changed.yml test: - name: Check examples ${{ matrix.os }} (using rustc ${{ matrix.rust }}) + name: Check needs: [get-leptos-changed] if: needs.get-leptos-changed.outputs.leptos_changed == 'true' - runs-on: ${{ matrix.os }} strategy: matrix: - rust: - - stable - os: - - ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - components: rustfmt - - - name: Add wasm32-unknown-unknown - run: rustup target add wasm32-unknown-unknown - - - name: Setup cargo-make - uses: davidB/rust-cargo-make@v1 - - - name: Cargo generate-lockfile - run: cargo generate-lockfile - - - uses: Swatinem/rust-cache@v2 - - - name: Run cargo check on all examples - run: cargo make --profile=github-actions check-stable + directory: [examples/counters_stable, examples/counter_without_macros] + uses: ./.github/workflows/run-cargo-make-task.yml + with: + directory: ${{ matrix.directory }} + cargo_make_task: "check" + toolchain: stable diff --git a/.github/workflows/ci-changed-examples.yml b/.github/workflows/ci-changed-examples.yml index f767ba8707..0b990839d9 100644 --- a/.github/workflows/ci-changed-examples.yml +++ b/.github/workflows/ci-changed-examples.yml @@ -29,3 +29,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" + toolchain: nightly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf40201655..a07332c39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,3 +41,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" + toolchain: nightly diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml index 52c2ffce4d..b58d7f9a59 100644 --- a/.github/workflows/run-cargo-make-task.yml +++ b/.github/workflows/run-cargo-make-task.yml @@ -9,6 +9,9 @@ on: cargo_make_task: required: true type: string + toolchain: + required: true + type: string env: CARGO_TERM_COLOR: always @@ -16,14 +19,8 @@ env: jobs: test: - name: Run ${{ matrix.os }} (using rustc ${{ matrix.rust }}) - runs-on: ${{ matrix.os }} - strategy: - matrix: - rust: - - nightly - os: - - ubuntu-latest + name: Run ${{ inputs.cargo_make_task }} (${{ inputs.toolchain }}) + runs-on: ubuntu-latest steps: # Setup environment @@ -32,7 +29,7 @@ jobs: - name: Setup Rust uses: actions-rs/toolchain@v1 with: - toolchain: ${{ matrix.rust }} + toolchain: ${{ inputs.toolchain }} override: true components: rustfmt diff --git a/.github/workflows/verify-all-examples.yml b/.github/workflows/verify-all-examples.yml index 539946a246..16efd8329e 100644 --- a/.github/workflows/verify-all-examples.yml +++ b/.github/workflows/verify-all-examples.yml @@ -23,3 +23,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" + toolchain: nightly