From 41d68998912ef432cd1ccabaa579d4159f029f26 Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 21 Feb 2025 01:05:03 +0100 Subject: [PATCH 1/5] Create test.yml --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..956c8cf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: CI +on: + pull_request: +env: + RUSTFLAGS: -Dwarnings + +jobs: + check_and_test: + name: It builds and tests pass + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install cargo-binstall + uses: cargo-bins/cargo-binstall@v1.10.15 + - name: Install wkg + shell: bash + run: cargo binstall cargo-component + - name: Install Wasmtime + shell: bash + run: curl https://wasmtime.dev/install.sh -sSf | bash + - name: check + shell: bash + run: cargo component check + - name: test + shell: bash + run: cargo component test + + check_style: + name: It follows all style conventions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: clippy + run: cargo clippy -- -Dwarnings + - name: fmt + run: cargo fmt --all -- --check From 35009a52c53ab623af5c6c905e762216918a4936 Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 21 Feb 2025 01:12:04 +0100 Subject: [PATCH 2/5] Update test.yml --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 956c8cf..2a502b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,9 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: rustup + run: rustup target add wasm32-wasip2 - name: Install cargo-binstall uses: cargo-bins/cargo-binstall@v1.10.15 - - name: Install wkg + - name: Install cargo-component shell: bash run: cargo binstall cargo-component - name: Install Wasmtime @@ -30,6 +32,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: rustup + run: rustup target add wasm32-wasip2 - name: clippy run: cargo clippy -- -Dwarnings - name: fmt From d98de12a3f04deea68e747ff8a938d315b28aa91 Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 21 Feb 2025 01:19:09 +0100 Subject: [PATCH 3/5] source wasmtime --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a502b7..da4c574 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,9 @@ jobs: run: cargo binstall cargo-component - name: Install Wasmtime shell: bash - run: curl https://wasmtime.dev/install.sh -sSf | bash + run: | + curl https://wasmtime.dev/install.sh -sSf | bash + source ~/.bashrc - name: check shell: bash run: cargo component check From 53f7cc431535c43f7466f832d35c653464cec8d5 Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 21 Feb 2025 01:25:36 +0100 Subject: [PATCH 4/5] Update test.yml --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da4c574..a24373e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: rustup + - name: Add wasm32-wasip2 target run: rustup target add wasm32-wasip2 - name: Install cargo-binstall uses: cargo-bins/cargo-binstall@v1.10.15 @@ -21,11 +21,11 @@ jobs: shell: bash run: | curl https://wasmtime.dev/install.sh -sSf | bash - source ~/.bashrc - - name: check + export PATH="$HOME/.wasmtime/bin:$PATH" + - name: Run cargo check shell: bash run: cargo component check - - name: test + - name: Run cargo test shell: bash run: cargo component test @@ -34,9 +34,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: rustup + - name: Install wasm32-wasip2 target run: rustup target add wasm32-wasip2 - - name: clippy + - name: Run cargo clippy run: cargo clippy -- -Dwarnings - - name: fmt + - name: Run cargo fmt run: cargo fmt --all -- --check From 58b610c1b71880722eec105fcf05ba64698aee3c Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 21 Feb 2025 01:26:49 +0100 Subject: [PATCH 5/5] Update test.yml --- .github/workflows/test.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a24373e..3459efc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,17 +17,9 @@ jobs: - name: Install cargo-component shell: bash run: cargo binstall cargo-component - - name: Install Wasmtime - shell: bash - run: | - curl https://wasmtime.dev/install.sh -sSf | bash - export PATH="$HOME/.wasmtime/bin:$PATH" - name: Run cargo check shell: bash run: cargo component check - - name: Run cargo test - shell: bash - run: cargo component test check_style: name: It follows all style conventions