diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..94cf3a1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +on: push + +name: Build and test + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + rust: [ stable ] + + name: ${{ matrix.os }}, Rust ${{ matrix.rust }} + steps: + - uses: actions/checkout@v2 + + - name: Install Rust (rustup) + run: | + rustup update ${{ matrix.rust }} --no-self-update + rustup default ${{ matrix.rust }} + rustup component add rustfmt + rustc --version + shell: bash + + - name: Build (release) + run: cargo build --verbose --release + + - name: Check formatting + run: cargo fmt -- --check + + - name: Test + run: cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e15ba3c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: rust -cache: cargo -rust: - - 1.37.0 - -before_script: -- rustup component add rustfmt - -script: -- cargo build -- cargo test -- cargo fmt -- --check diff --git a/README.md b/README.md index fe5ba6a..50e0afe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/cruessler/git-tree.svg?branch=master)](https://travis-ci.org/cruessler/git-tree) +[![Build Status](https://github.com/cruessler/git-tree/workflows/build/badge.svg)](https://github.com/cruessler/git-tree/actions?query=workflow%3Abuild) # git-tree