Update all uncommented commands to remove actions-rs (#1366)

* Update all uncommented commands to remove actions-rs (#1)

* install target in toolchain action

* add linux target explicitly

* try latest

* fix install
This commit is contained in:
Evan Simkowitz authored and GitHub committed 2023-08-22 19:48:03 -05:00
1 parent da4794d793
commit de87ba6548
3 files changed
+65 -86

No files matched your search

+22 -24
View File
@@ -85,52 +85,56 @@ jobs:
matrix_test: matrix_test:
runs-on: ${{ matrix.platform.os }} runs-on: ${{ matrix.platform.os }}
env:
RUST_CARGO_COMMAND: ${{ matrix.platform.cross == true && 'cross' || 'cargo' }}
strategy: strategy:
matrix: matrix:
platform: platform:
- { - {
target: x86_64-pc-windows-msvc, target: x86_64-pc-windows-msvc,
os: windows-latest, os: windows-latest,
toolchain: '1.70.0', toolchain: "1.70.0",
cross: false, cross: false,
command: 'test', command: "test",
args: '--all --tests' args: "--all --tests",
} }
- { - {
target: x86_64-apple-darwin, target: x86_64-apple-darwin,
os: macos-latest, os: macos-latest,
toolchain: '1.70.0', toolchain: "1.70.0",
cross: false, cross: false,
command: 'test', command: "test",
args: '--all --tests' args: "--all --tests",
} }
- { - {
target: aarch64-apple-ios, target: aarch64-apple-ios,
os: macos-latest, os: macos-latest,
toolchain: '1.70.0', toolchain: "1.70.0",
cross: false, cross: false,
command: 'build', command: "build",
args: '--package dioxus-mobile' args: "--package dioxus-mobile",
} }
- { - {
target: aarch64-linux-android, target: aarch64-linux-android,
os: ubuntu-latest, os: ubuntu-latest,
toolchain: '1.70.0', toolchain: "1.70.0",
cross: true, cross: true,
command: 'build', command: "build",
args: '--package dioxus-mobile' args: "--package dioxus-mobile",
} }
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install stable - name: install stable
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
toolchain: ${{ matrix.platform.toolchain }} toolchain: ${{ matrix.platform.toolchain }}
target: ${{ matrix.platform.target }} targets: ${{ matrix.platform.target }}
override: true
default: true - name: Install cross
if: ${{ matrix.platform.cross == true }}
uses: taiki-e/install-action@cross
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
@@ -138,13 +142,8 @@ jobs:
save-if: ${{ matrix.features.key == 'all' }} save-if: ${{ matrix.features.key == 'all' }}
- name: test - name: test
uses: actions-rs/cargo@v1 run: |
with: ${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --target ${{ matrix.platform.target }} ${{ matrix.platform.args }}
# Coverage is disabled until we can fix it # Coverage is disabled until we can fix it
# coverage: # coverage:
@@ -166,4 +165,3 @@ jobs:
# uses: codecov/codecov-action@v2 # uses: codecov/codecov-action@v2
# with: # with:
# fail_ci_if_error: false # fail_ci_if_error: false
+34 -37
View File
@@ -1,9 +1,9 @@
name: Playwright Tests name: Playwright Tests
on: on:
push: push:
branches: [ main, master ] branches: [main, master]
pull_request: pull_request:
branches: [ main, master ] branches: [main, master]
defaults: defaults:
run: run:
working-directory: ./playwright-tests working-directory: ./playwright-tests
@@ -16,39 +16,36 @@ jobs:
test: test:
if: github.event.pull_request.draft == false if: github.event.pull_request.draft == false
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
# Do our best to cache the toolchain and node install steps # Do our best to cache the toolchain and node install steps
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 16
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@master
with: with:
profile: minimal toolchain: stable
toolchain: stable targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
override: true - uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2 - name: Install dependencies
- name: Install WASM toolchain run: npm ci
run: rustup target add wasm32-unknown-unknown - name: Install Playwright
- name: Install dependencies run: npm install -D @playwright/test
run: npm ci - name: Install Playwright Browsers
- name: Install Playwright run: npx playwright install --with-deps
run: npm install -D @playwright/test # Cache the CLI by using cargo run internally
- name: Install Playwright Browsers # - name: Install Dioxus CLI
run: npx playwright install --with-deps # uses: actions-rs/cargo@v1
# Cache the CLI by using cargo run internally # with:
# - name: Install Dioxus CLI # command: install
# uses: actions-rs/cargo@v1 # args: --path packages/cli
# with: - name: Run Playwright tests
# command: install run: npx playwright test
# args: --path packages/cli - uses: actions/upload-artifact@v3
- name: Run Playwright tests if: always()
run: npx playwright test with:
- uses: actions/upload-artifact@v3 name: playwright-report
if: always() path: playwright-report/
with: retention-days: 30
name: playwright-report
path: playwright-report/
retention-days: 30
+9 -25
View File
@@ -8,47 +8,31 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - name: Install Rust
with: uses: dtolnay/rust-toolchain@stable
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1 - run: cargo check
with:
command: check
test: test:
name: Test Suite name: Test Suite
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - name: Install Rust
with: uses: dtolnay/rust-toolchain@stable
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1 - run: cargo test
with:
command: test
fmt: fmt:
name: Rustfmt name: Rustfmt
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - name: Install Rust
with: uses: dtolnay/rust-toolchain@stable
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- run: rustup component add rustfmt - run: rustup component add rustfmt
- uses: actions-rs/cargo@v1 - run: cargo fmt --all -- --check
with:
command: fmt
args: --all -- --check
# clippy: # clippy:
# name: Clippy # name: Clippy