diff --git a/.github/workflows/audit-rust.yml b/.github/workflows/audit-rust.yml new file mode 100644 index 0000000..033ed40 --- /dev/null +++ b/.github/workflows/audit-rust.yml @@ -0,0 +1,17 @@ +name: Security audit + +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + schedule: + - cron: '0 0 * * *' +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/audit-secrets.yml b/.github/workflows/audit-secrets.yml new file mode 100644 index 0000000..13a0a61 --- /dev/null +++ b/.github/workflows/audit-secrets.yml @@ -0,0 +1,12 @@ +name: Secrets audit + +on: [push] + +jobs: + audit: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: gitleaks-action + uses: aslafy-z/gitleaks-action@912885d diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..4d011db --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,23 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + Hey there ${{ github.actor }}, looks like this is your first contribution! Welcome! :slightly_smiling_face: We're excited to have you! + + If you haven't already, be sure to check out the [code of conduct](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/CODE_OF_CONDUCT.md). + + This message was generated by the [`greetings`](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/greetings.yml) Github workflow. + pr-message: | + Hey there ${{ github.actor }}, looks like this is your first contribution! Welcome! :slightly_smiling_face: We're excited to have you! + + If you haven't already, be sure to check out the [code of conduct](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/CODE_OF_CONDUCT.md). + + This message was generated by the [`greetings`](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/greetings.yml) Github workflow. diff --git a/.github/workflows/pr-wip.yml b/.github/workflows/pr-wip.yml new file mode 100644 index 0000000..c6d0460 --- /dev/null +++ b/.github/workflows/pr-wip.yml @@ -0,0 +1,9 @@ +on: [pull_request] +name: Check for WIP PR + +jobs: + wip: + name: Check for WIP PR + runs-on: ubuntu-latest + steps: + - uses: wip/action@master diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..ba6e19b --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,102 @@ +name: Push checks + +on: [push] + +jobs: + check: + name: Check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + rust: + - stable + - beta + steps: + - name: Checkout sources + uses: actions/checkout@v1 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + + - name: "Run `cargo check`" + uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + rust: + - stable + - beta + steps: + - name: Checkout sources + uses: actions/checkout@v1 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + + - name: "Run `cargo test`" + uses: actions-rs/cargo@v1 + with: + command: test + + fmt: + name: Rustfmt + runs-on: ${{ matrix.os }} + strategy: + matrix: + rust: + - stable + steps: + - name: Checkout sources + uses: actions/checkout@v1 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt + + - name: "Run `cargo fmt`" + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + rust: + - stable + - beta + steps: + - name: Checkout sources + uses: actions/checkout@v1 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + components: clippy + + - name: "Run `cargo clippy`" + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml new file mode 100644 index 0000000..bf96154 --- /dev/null +++ b/.github/workflows/release-on-tag.yml @@ -0,0 +1,24 @@ +on: + push: + tags: + - 'v*' + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create Release + id: create_release + uses: actions/create-release@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..688fb4d --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3272d82..0000000 --- a/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -language: rust -cache: cargo -env: # required for allow_failures -rust: - - stable - - beta - - nightly -os: - - linux - - macos - - windows - -matrix: - fast_finish: true - allow_failures: - - env: NAME='Clippy' - - env: NAME='cargo-travis' - - rust: nightly - include: - - name: Rustfmt - rust: stable - before_script: - - rustup component add rustfmt - script: - - cargo fmt -- --check - - name: Clippy - rust: stable - before_script: - - rustup component add clippy - script: - - cargo clippy --release - - env: NAME='cargo-travis' - sudo: required # travis-ci/travis-ci#9061 - before_script: - - export PATH=$HOME/.cargo/bin:$PATH - - cargo install cargo-update || echo "cargo-update already installed" - - cargo install cargo-travis || echo "cargo-travis already installed" - - cargo install-update -a - script: - - cargo coveralls --verbose - addons: # required for kcov - apt: - packages: - - libcurl4-openssl-dev - - libelf-dev - - libdw-dev - - binutils-dev - - cmake # also required for cargo-update - sources: - - kalakris-cmake - -script: | - cargo test --verbose --release --all && - cargo doc --verbose --release diff --git a/semantic.yml b/semantic.yml new file mode 100644 index 0000000..df131b3 --- /dev/null +++ b/semantic.yml @@ -0,0 +1,2 @@ +allowMergeCommits: true +commitsOnly: true