Bladeren bron

Add configuration for GitHub Actions

Dirkjan Ochtman 6 jaren geleden
bovenliggende
commit
af0a8db253
3 gewijzigde bestanden met toevoegingen van 89 en 1 verwijderingen
  1. 84 0
      .github/workflows/main.yml
  2. 1 1
      README.md
  3. 4 0
      deny.toml

+ 84 - 0
.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

+ 1 - 1
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/).
 

+ 4 - 0
deny.toml

@@ -0,0 +1,4 @@
+[licenses]
+allow-osi-fsf-free = "either"
+copyleft = "warn"
+private = { ignore = true }