Skip to content

Commit

Permalink
Merge pull request #30 from jonhoo/ci
Browse files Browse the repository at this point in the history
Move to GitHub Actions CI
  • Loading branch information
jonhoo authored Sep 17, 2022
2 parents c88bf9d + 934c921 commit 2b82dc4
Show file tree
Hide file tree
Showing 14 changed files with 245 additions and 53 deletions.
21 changes: 21 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ref: https://docs.codecov.com/docs/codecovyml-reference
coverage:
# Hold ourselves to a high bar
range: 85..100
round: down
precision: 1
status:
# ref: https://docs.codecov.com/docs/commit-status
project:
default:
# Avoid false negatives
threshold: 1%

# Test files aren't important for coverage
ignore:
- "tests"

# Make comments less noisy
comment:
layout: "files"
require_changes: yes
34 changes: 34 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches: [main]
pull_request:
name: coverage
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
env: # set this explicitly so integration tests will run
FAKTORY_URL: tcp://127.0.0.1:7419
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
services:
faktory:
image: contribsys/faktory:latest
ports:
- 7419:7419
- 7420:7420
23 changes: 23 additions & 0 deletions .github/workflows/features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches: [main]
pull_request:
name: cargo hack
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack
uses: actions-rs/cargo@v1
with:
command: hack
args: --feature-powerset check --all-targets
39 changes: 39 additions & 0 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches: [main]
pull_request:
name: With dependencies at minimal versions
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
with:
submodules: true
- name: cargo update -Zminimal-versions
uses: actions-rs/cargo@v1
with:
command: update
toolchain: nightly
args: -Zminimal-versions
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all-targets
env: # set this explicitly so integration tests will run
FAKTORY_URL: tcp://127.0.0.1:7419
services:
faktory:
image: contribsys/faktory:latest
ports:
- 7419:7419
- 7420:7420
21 changes: 21 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches: [main]
pull_request:
name: Minimum Supported Rust Version
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.57.0
override: true
- uses: actions/checkout@v3
with:
submodules: true
- name: cargo +1.57.0 check
uses: actions-rs/cargo@v1
with:
command: check
24 changes: 24 additions & 0 deletions .github/workflows/os-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
branches: [main]
pull_request:
name: os check
jobs:
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all-targets
48 changes: 48 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
branches: [main]
pull_request:
name: lint
jobs:
style:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }}
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- uses: actions/checkout@v3
with:
submodules: true
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- name: cargo clippy
uses: actions-rs/clippy-check@v1
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- uses: actions/checkout@v3
- name: cargo doc
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: doc
args: --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches: [main]
pull_request:
name: cargo test
jobs:
test:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
- uses: actions/checkout@v3
with:
submodules: true
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all-targets
env: # set this explicitly so integration tests will run
FAKTORY_URL: tcp://127.0.0.1:7419
services:
faktory:
image: contribsys/faktory:latest
ports:
- 7419:7419
- 7420:7420
9 changes: 2 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ repository = "https://github.com/jonhoo/faktory-rs.git"
keywords = ["faktory", "api-bindings", "work-server", "job-server"]
categories = ["api-bindings", "asynchronous", "network-programming"]

[badges]
azure-devops = { project = "jonhoo/jonhoo", pipeline = "faktory", build = "19" }
codecov = { repository = "jonhoo/faktory-rs", branch = "master", service = "github" }
maintenance = { status = "passively-maintained" }

[features]
default = []
tls = ["native-tls"]
Expand All @@ -34,9 +29,9 @@ rand = "0.8"
chrono = { version = "0.4", features = ["serde", "clock"], default-features = false }
url = "2"
atomic-option = "0.1"
fnv = "1.0.3"
fnv = "1.0.5"
native-tls = { version = "0.2", optional = true }
clap = { version = "3", optional = true }
clap = { version = "3.1.0", optional = true }
thiserror = "1.0.30"

[dev-dependencies]
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Crates.io](https://img.shields.io/crates/v/faktory.svg)](https://crates.io/crates/faktory)
[![Documentation](https://docs.rs/faktory/badge.svg)](https://docs.rs/faktory/)
[![Build Status](https://dev.azure.com/jonhoo/jonhoo/_apis/build/status/faktory?branchName=master)](https://dev.azure.com/jonhoo/jonhoo/_build/latest?definitionId=19&branchName=master)
[![Codecov](https://codecov.io/github/jonhoo/faktory-rs/coverage.svg?branch=master)](https://codecov.io/gh/jonhoo/faktory-rs)
[![dependency status](https://deps.rs/repo/github/jonhoo/faktory-rs/status.svg)](https://deps.rs/repo/github/jonhoo/faktory-rs)

Expand Down
2 changes: 0 additions & 2 deletions README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[![Crates.io](https://img.shields.io/crates/v/faktory.svg)](https://crates.io/crates/faktory)
[![Documentation](https://docs.rs/faktory/badge.svg)](https://docs.rs/faktory/)
[![Build Status](https://travis-ci.org/jonhoo/faktory-rs.svg?branch=master)](https://travis-ci.org/jonhoo/faktory-rs)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/jonhoo/faktory-rs?svg=true&branch=master)](https://ci.appveyor.com/project/jonhoo/faktory-rs)
[![Codecov](https://codecov.io/github/jonhoo/faktory-rs/coverage.svg?branch=master)](https://codecov.io/gh/jonhoo/faktory-rs)
[![dependency status](https://deps.rs/repo/github/jonhoo/faktory-rs/status.svg)](https://deps.rs/repo/github/jonhoo/faktory-rs)

Expand Down
38 changes: 0 additions & 38 deletions azure-pipelines.yml

This file was deleted.

1 change: 0 additions & 1 deletion rustfmt.toml

This file was deleted.

4 changes: 0 additions & 4 deletions tarpaulin.toml

This file was deleted.

0 comments on commit 2b82dc4

Please sign in to comment.