From c9bd741c9b20fb72916d36be7d49ce3b458debc7 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 9 Jun 2022 01:53:10 +1000 Subject: [PATCH 1/3] Add new workflow ci Signed-off-by: Jiahao XU --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7d8ae7d0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Rust + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Configure toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Configure caching + uses: actions/cache@v2 + with: + key: ${{ matrix.os }}-${{ matrix.target }}-testing + path: | + ${{ env.HOME }}/.cargo + target + - name: test + uses: actions-rs/cargo@v1 + with: + command: test From 14823fbae73ed67199d848a67587e38492c57fd8 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 9 Jun 2022 01:53:24 +1000 Subject: [PATCH 2/3] Fix `test::parse_meta` in `lib.rs` Signed-off-by: Jiahao XU --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d83d7887..0ad83f42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -168,7 +168,7 @@ mod test { &[Product { name: Some("cargo-binstall".to_string()), path: Some("src/main.rs".to_string()), - edition: Some(cargo_toml::Edition::E2018), + edition: Some(cargo_toml::Edition::E2021), ..Default::default() },], ); From 951dacd03d4fdeb8b0731c7909bd0425d5aff0d0 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 9 Jun 2022 02:00:38 +1000 Subject: [PATCH 3/3] Fix cache key used in workflow "ci" Signed-off-by: Jiahao XU --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d8ae7d0..a74ae2c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - name: Configure caching uses: actions/cache@v2 with: - key: ${{ matrix.os }}-${{ matrix.target }}-testing + key: ubuntu-latest-stable-testing path: | ${{ env.HOME }}/.cargo target