From 67f7266ef99863e211631d4f30fd1c6e2768be8a Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 3 Dec 2020 22:09:18 +0200 Subject: [PATCH] Migrate to Github actions (fix #56) (#66) --- .github/workflows/rust.yml | 38 ++++++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 37 ------------------------------------- 2 files changed, 38 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/rust.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..1089172 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,38 @@ +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1.0.1 + name: Check format + with: + command: fmt + args: --all -- --check + - uses: actions-rs/cargo@v1.0.1 + name: Run clippy + with: + command: clippy + args: --all-targets --locked -- -D warnings + - uses: actions-rs/cargo@v1.0.1 + name: Run tests + with: + command: test diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index aa07de9..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,37 +0,0 @@ -stages: - - stage: Check - jobs: - - job: Check - displayName: Sanity Check - pool: - vmImage: 'ubuntu-16.04' - container: 'rust:latest' - steps: - - script: rustup component add clippy rustfmt - displayName: Install clippy and rustfmt - - script: cargo fmt -- --check - displayName: Check Formatting - - script: cargo check --all - displayName: Check - - script: cargo clippy - displayName: Clippy - - - stage: Build - jobs: - - job: BuildDocker - displayName: Build Docker Image - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: Docker@2 - displayName: Login to Dockerhub - inputs: - command: login - containerRegistry: Dockerhub - - task: Docker@2 - displayName: Build and Push - inputs: - command: buildAndPush - repository: darwish/alma - tags: | - latest