Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1028 from cloudflare/avery/run-action
Browse files Browse the repository at this point in the history
test rust with GitHub Actions
  • Loading branch information
ashleygwilliams authored Feb 5, 2020
2 parents 0062c69 + 3355e66 commit bd856e8
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 34 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Rust

on: [push]

jobs:
test-linux-stable:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Test Linux Stable
run: cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

test-linux-nightly:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Test Linux Nightly
run: |
rustup override set nightly
cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

test-windows-stable:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Test Windows Stable
run: cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

test-windows-nightly:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Test Windows Nightly
run: |
rustup override set nightly
cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1


test-macos-stable:
runs-on: macos-latest

steps:
- uses: actions/checkout@v1
- name: Test MacOS Stable
run: cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

test-macos-nightly:
runs-on: macos-latest

steps:
- uses: actions/checkout@v1
- name: Test MacOS Nightly
run: |
rustup override set nightly
cargo test --locked --verbose
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

40 changes: 6 additions & 34 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,19 @@ trigger:
- refs/tags/*

jobs:
- job: test_wrangler
displayName: "Run wrangler tests, fmt, and clippy"
- job: lint_wrangler
displayName: "Run linters"
steps:
- template: ci/azure-install-rust.yml
- template: ci/azure-install-node.yml
- script: cargo test --locked
displayName: "cargo test --locked"
- script: rustup component add rustfmt
displayName: rustup component add rustfmt
displayName: Install rustfmt
- script: cargo fmt --all -- --check
displayName: "cargo fmt --all -- --check"
displayName: Run rustfmt
- script: rustup component add clippy
displayName: rustup component add clippy
displayName: Install clippy
- script: cargo clippy
displayName: "cargo clippy --all --all-features -- -D warnings"

- job: test_wrangler_windows
displayName: "Run wrangler tests (Windows)"
pool:
vmImage: vs2017-win2016
steps:
- template: ci/azure-install-rust.yml
- template: ci/azure-install-node.yml
- script: cargo test --locked
displayName: "cargo test --locked"
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1

- job: test_wrangler_nightly
displayName: "Run wrangler tests (nightly)"
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: 'nightly'
- template: ci/azure-install-node.yml
- script: cargo test --locked
displayName: "cargo test --locked"
env:
RUST_LOG: warn,wrangler=info
RUST_BACKTRACE: 1
displayName: Run clippy

- job: dist_linux
displayName: "Dist Linux binary"
Expand Down

0 comments on commit bd856e8

Please sign in to comment.