From 006cae8b30d59e811c18ca4c7401716110f6085a Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 24 Aug 2020 14:01:24 +0200 Subject: [PATCH] Add configuration for GitHub Actions --- .github/workflows/main.yml | 84 ++++++++++++++++++++++++++++++++++++++ README.md | 2 +- deny.toml | 4 ++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml create mode 100644 deny.toml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2919875 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,84 @@ +name: CI + +on: + push: + branches: ['master'] + pull_request: + +jobs: + Test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [1.36.0, stable, beta, nightly] + exclude: + - os: macos-latest + rust: 1.36.0 + - os: windows-latest + rust: 1.36.0 + - os: macos-latest + rust: beta + - os: windows-latest + rust: beta + - os: macos-latest + rust: nightly + - os: windows-latest + rust: nightly + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --all-targets + - uses: actions-rs/cargo@v1 + with: + command: test + + WASM: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --target wasm32-unknown-unknown + + Lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - uses: actions-rs/cargo@v1 + if: always() + with: + command: clippy + args: --workspace --all-targets -- -D warnings + + Audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: EmbarkStudios/cargo-deny-action@v0 diff --git a/README.md b/README.md index f1a2ecf..9802577 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ rust-url ======== -[![Travis build Status](https://travis-ci.com/servo/rust-url.svg?branch=master)](https://travis-ci.com/servo/rust-url) [![Appveyor build status](https://ci.appveyor.com/api/projects/status/ulkqx2xcemyod6xa?svg=true)](https://ci.appveyor.com/project/Manishearth/rust-url) +[![Build status](https://github.com/servo/rust-url/workflows/CI/badge.svg)](https://github.com/servo/rust-url/actions?query=workflow%3ACI) URL library for Rust, based on the [URL Standard](https://url.spec.whatwg.org/). diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..91b1c79 --- /dev/null +++ b/deny.toml @@ -0,0 +1,4 @@ +[licenses] +allow-osi-fsf-free = "either" +copyleft = "warn" +private = { ignore = true }