diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d876a52 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + pull_request: + +jobs: + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: dtolnay/rust-toolchain@stable + + - name: Check format + run: | + cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Run clippy + run: | + cargo clippy -- -D warnings + + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Run tests + run: | + cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e197bb7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: rust -rust: -- stable -- beta -- nightly -matrix: - allow_failures: - - rust: nightly - fast_finish: true diff --git a/README.md b/README.md index 194cac6..68a2997 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/21re/rust-geo-booleanop.svg?branch=master)](https://travis-ci.org/21re/rust-geo-booleanop) +[![Build Status](https://github.com/21re/rust-geo-booleanop/actions/workflows/ci.yml/badge.svg)](https://github.com/21re/rust-geo-booleanop/actions/workflows/ci.yml) [![crates.io](https://img.shields.io/crates/v/geo-booleanop.svg)](https://crates.io/crates/geo-booleanop) diff --git a/tests/src/bin/run_single_test.rs b/tests/src/bin/run_single_test.rs index bf9dcd2..9f39f25 100644 --- a/tests/src/bin/run_single_test.rs +++ b/tests/src/bin/run_single_test.rs @@ -52,7 +52,7 @@ fn main() { let filename_in = matches.get_one::("file").unwrap(); let filename_out = filename_in.clone() + ".generated"; - fs::copy(&filename_in, &filename_out).expect("Failed to copy file."); + fs::copy(filename_in, &filename_out).expect("Failed to copy file."); run_generic_test_case_with_extra_options(&filename_out, swap_ab);