diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 3af63ef..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Rust CI - -on: - push: - branches: - - master - - '**/*.rs' - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Check out the repository - uses: actions/checkout@v3 - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Cache Cargo registry - uses: actions/cache@v3 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- - - - name: Cache Cargo index - uses: actions/cache@v3 - with: - path: ~/.cargo/index - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-index- - - - name: Cache Cargo build - uses: actions/cache@v3 - with: - path: target - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-build- - - - name: Build - run: cargo build --verbose - - - name: Run tests - run: cargo test --verbose - - - name: Run Clippy - run: cargo clippy -- -D warnings - - - name: Run Rustfmt - run: cargo fmt -- --check diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..81f4a3d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Rust CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: [stable, beta, nightly] + continue-on-error: ${{ matrix.toolchain == 'nightly' }} + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + override: true + - name: Build + run: cargo build --release + - name: Run example tests + run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1c15489..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -sudo: required -language: rust -os: - - linux -rust: - - stable - - beta - - nightly -matrix: - allow_failures: - - rust: nightly -script: -- cargo build --release -- make test diff --git a/Cargo.toml b/Cargo.toml index bfe2e05..de3015b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ categories = ["development-tools::testing"] license = "MIT" [badges] -travis-ci = { repository = "Alkass/polish" } +github-actions = { repository = "AlKass/polish", workflow = "Rust CI" } [dependencies] chrono = "0.3.0" diff --git a/README.md b/README.md index 389fbc0..5636be6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/Alkass/polish.svg?branch=master)](https://travis-ci.org/Alkass/polish) +[![Rust CI](https://github.com/AlKass/polish/actions/workflows/ci.yml/badge.svg)](https://github.com/AlKass/polish/actions/workflows/ci.yml) [![Crates Package Status](https://img.shields.io/crates/v/polish.svg)](https://crates.io/crates/polish) [![](https://docs.rs/polish/badge.svg)](https://docs.rs/polish) [![](https://img.shields.io/crates/d/polish.svg)](https://crates.io/crates/polish)