Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add gha workflows and renovatebot configurations #1

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
':semanticCommits',
':semanticCommitTypeAll(chore)',
'helpers:pinGitHubActionDigests',
],
schedule: [
'before 6am on Monday',
],
configMigration: true,
rebaseWhen: 'behind-base-branch',
lockFileMaintenance: {
enabled: true,
},
packageRules: [
{
groupName: 'futures crates',
groupSlug: 'futures',
matchManagers: [
'cargo',
],
matchPackageNames: [
'futures',
],
matchPackagePrefixes: [
'futures-',
'futures_',
],
},
{
groupName: 'serde crates',
groupSlug: 'serde',
matchManagers: [
'cargo',
],
matchPackageNames: [
'serde',
],
matchPackagePrefixes: [
'serde-',
'serde_',
],
},
{
groupName: 'tonic crates',
groupSlug: 'tonic',
matchManagers: [
'cargo',
],
matchSourceUrlPrefixes: [
'https://github.com/hyperium/tonic',
'https://github.com/tokio-rs/prost',
],
},
{
groupName: 'tracing crates',
groupSlug: 'tracing',
matchManagers: [
'cargo',
],
matchSourceUrlPrefixes: [
'https://github.com/tokio-rs/tracing',
],
matchPackagePrefixes: [
'tracing-',
'tracing_',
],
},
{
groupName: 'alloy-rs core types monorepo',
groupSlug: 'alloy-core',
matchManagers: [
'cargo',
],
matchSourceUrlPrefixes: [
'https://github.com/alloy-rs/core',
],
},
{
groupName: 'async-graphql crates',
groupSlug: 'async-graphql',
matchManagers: [
'cargo',
],
matchPackageNames: [
'async-graphql',
],
matchPackagePrefixes: [
'async-graphql-',
],
},
],
customManagers: [
{
customType: 'regex',
fileMatch: [
'^rust-toolchain(\\.toml)?$',
],
matchStrings: [
'channel\\s*=\\s*"(?<currentValue>\\d+\\.\\d+\\.\\d+)"',
],
depNameTemplate: 'rust',
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
],
}
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci
on:
pull_request:
push:
branches:
- "main"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
GH_USER: ${{ github.repository_owner }}
GH_TOKEN: ${{ secrets.GH_PRIVATE_TOKEN }}

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
profile: minimal
override: true

- name: Cache Cargo build files
uses: Leafwing-Studios/cargo-cache@5edda26afa3d28be5d6ee87d4c69c246e3ee37fb # v1

- run: cargo check
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings

- name: Unit tests
run: cargo test --lib
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
proptest-regressions/
## IDEs and editors
/.idea
/.vscode

## Rust
**/*.rs.bk
/target/
Cargo.lock
test-outputs/
proptest-regressions/
Loading
Loading