diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9b836a8..7e90dad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,13 @@ version: 2 updates: -- package-ecosystem: cargo - directory: / - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: cargo + directory: / + schedule: + interval: daily + open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - # Check for updates to GitHub Actions every weekday - interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3165d43..bca1475 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,209 +1,170 @@ { "name": "CI", - "on": { - "push": { - "branches": [ - "trunk", - "v*", - "ci/*" - ] + "on": + { + "push": { "branches": ["trunk", "v*", "ci/*"] }, + "pull_request": { "branches": ["trunk", "v*"] }, }, - "pull_request": { - "branches": [ - "trunk", - "v*" - ] - } - }, - "jobs": { - "check": { - "name": "Check", - "runs-on": "ubuntu-latest", - "strategy": { - "fail-fast": false, - "matrix": { - "rust": [ - "stable", - "beta", - "nightly" - # "1.55.0" TODO: Pick latest stable version when we release 2.0 - ] - } - }, - "steps": [ - { - "uses": "actions/checkout@v4", - "name": "Checkout" - }, - { - "uses": "actions-rs/toolchain@v1", - "with": { - "profile": "minimal", - "toolchain": "${{ matrix.rust }}", - "override": true - }, - "name": "Install Rust ${{ matrix.rust }}" - }, - { - "uses": "actions-rs/cargo@v1", - "with": { - "command": "check", - "args": "--all-features" - }, - "name": "Run `cargo check`" + "jobs": + { + "check": + { + "name": "Check", + "runs-on": "ubuntu-latest", + "strategy": { "fail-fast": false, "matrix": { "rust": [ + "stable", + "beta", + "nightly", + # "1.55.0" TODO: Pick latest stable version when we release 2.0 + ] } }, + "steps": + [ + { "uses": "actions/checkout@v4", "name": "Checkout" }, + { + "uses": "actions-rs/toolchain@v1", + "with": + { + "profile": "minimal", + "toolchain": "${{ matrix.rust }}", + "override": true, + }, + "name": "Install Rust ${{ matrix.rust }}", + }, + { + "uses": "actions-rs/cargo@v1", + "with": { "command": "check", "args": "--all-features" }, + "name": "Run `cargo check`", + }, + { + "uses": "actions-rs/cargo@v1", + "with": { "command": "check", "args": "--examples" }, + "name": "Check examples", + }, + ], }, - { - "uses": "actions-rs/cargo@v1", - "with": { - "command": "check", - "args": "--examples" - }, - "name": "Check examples" - } - ] - }, - "test": { - "name": "Test", - "runs-on": "ubuntu-latest", - "strategy": { - "matrix": { - "rust": [ - "stable", - # "1.55.0" TODO: Pick latest stable version when we release 2.0 - ] - } - }, - "steps": [ - { - "uses": "actions/checkout@v4", - "name": "Checkout" + "test": + { + "name": "Test", + "runs-on": "ubuntu-latest", + "strategy": { "matrix": { "rust": [ + "stable", + # "1.55.0" TODO: Pick latest stable version when we release 2.0 + ] } }, + "steps": + [ + { "uses": "actions/checkout@v4", "name": "Checkout" }, + { + "uses": "actions-rs/toolchain@v1", + "with": + { + "profile": "minimal", + "toolchain": "${{ matrix.rust }}", + "override": true, + }, + "name": "Install Rust ${{ matrix.rust }}", + }, + { + "run": "cargo test --all --features proc-macro2", + "name": "Run `cargo test`", + "env": { "RUSTFLAGS": "-D warnings" }, + }, + ], }, - { - "uses": "actions-rs/toolchain@v1", - "with": { - "profile": "minimal", - "toolchain": "${{ matrix.rust }}", - "override": true - }, - "name": "Install Rust ${{ matrix.rust }}" + "test_project": + { + "name": "Test Project", + "runs-on": "ubuntu-latest", + "strategy": { "matrix": { "rust": [ + "stable", + # "1.55.0" TODO: Pick latest stable version when we release 0.1 + ] } }, + "steps": + [ + { "uses": "actions/checkout@v4", "name": "Checkout" }, + { + "uses": "actions-rs/toolchain@v1", + "with": + { + "profile": "minimal", + "toolchain": "${{ matrix.rust }}", + "override": true, + }, + "name": "Install Rust ${{ matrix.rust }}", + }, + { + "run": "cd test && cargo run", + "name": "Run the test project", + "env": { "RUSTFLAGS": "-D warnings" }, + }, + ], }, - { - "run": "cargo test --all --features proc-macro2", - "name": "Run `cargo test`", - "env": { - "RUSTFLAGS": "-D warnings" - } - } - ] - }, - "test_project": { - "name": "Test Project", - "runs-on": "ubuntu-latest", - "strategy": { - "matrix": { - "rust": [ - "stable", - # "1.55.0" TODO: Pick latest stable version when we release 0.1 - ] - } - }, - "steps": [ - { - "uses": "actions/checkout@v4", - "name": "Checkout" + "lints": + { + "name": "Lints", + "runs-on": "ubuntu-latest", + "steps": + [ + { "uses": "actions/checkout@v4", "name": "Checkout" }, + { + "uses": "actions-rs/toolchain@v1", + "with": + { + "profile": "minimal", + "toolchain": "stable", + "override": true, + "components": "rustfmt, clippy", + }, + "name": "Install Rust stable", + }, + { + "uses": "actions-rs/cargo@v1", + "with": { "command": "fmt", "args": "--all -- --check" }, + "name": "Run `cargo fmt`", + }, + { + "uses": "actions-rs/cargo@v1", + "with": + { + "command": "clippy", + "args": "--all-features -- -D warnings", + }, + "name": "Run `cargo clippy`", + }, + ], }, - { - "uses": "actions-rs/toolchain@v1", - "with": { - "profile": "minimal", - "toolchain": "${{ matrix.rust }}", - "override": true - }, - "name": "Install Rust ${{ matrix.rust }}" + "coverage": + { + "name": "Code Coverage", + "runs-on": "ubuntu-latest", + "steps": + [ + { "uses": "actions/checkout@v4", "name": "Checkout" }, + { + "uses": "actions-rs/toolchain@v1", + "with": + { + "profile": "minimal", + "toolchain": "nightly", + "override": true, + }, + "name": "Install Rust nightly", + }, + { + "name": "Run cargo-tarpaulin", + "uses": "actions-rs/tarpaulin@v0.1", + "with": { "version": "0.18.2", "args": "--all" }, + }, + { + "name": "Upload to codecov.io", + "uses": "codecov/codecov-action@v3", + }, + { + "name": "Archive code coverage results", + "uses": "actions/upload-artifact@v3", + "with": + { "name": "code-coverage-report", "path": "cobertura.xml" }, + }, + ], }, - { - "run": "cd test && cargo run", - "name": "Run the test project", - "env": { - "RUSTFLAGS": "-D warnings" - } - } - ] }, - "lints": { - "name": "Lints", - "runs-on": "ubuntu-latest", - "steps": [ - { - "uses": "actions/checkout@v4", - "name": "Checkout" - }, - { - "uses": "actions-rs/toolchain@v1", - "with": { - "profile": "minimal", - "toolchain": "stable", - "override": true, - "components": "rustfmt, clippy" - }, - "name": "Install Rust stable" - }, - { - "uses": "actions-rs/cargo@v1", - "with": { - "command": "fmt", - "args": "--all -- --check" - }, - "name": "Run `cargo fmt`" - }, - { - "uses": "actions-rs/cargo@v1", - "with": { - "command": "clippy", - "args": "--all-features -- -D warnings" - }, - "name": "Run `cargo clippy`" - } - ] - }, - "coverage": { - "name": "Code Coverage", - "runs-on": "ubuntu-latest", - "steps": [ - { - "uses": "actions/checkout@v4", - "name": "Checkout" - }, - { - "uses": "actions-rs/toolchain@v1", - "with": { - "profile": "minimal", - "toolchain": "nightly", - "override": true - }, - "name": "Install Rust nightly" - }, - { - "name": "Run cargo-tarpaulin", - "uses": "actions-rs/tarpaulin@v0.1", - "with": { - "version": "0.18.2", - "args": "--all" - } - }, - { - "name": "Upload to codecov.io", - "uses": "codecov/codecov-action@v3" - }, - { - "name": "Archive code coverage results", - "uses": "actions/upload-artifact@v3", - "with": { - "name": "code-coverage-report", - "path": "cobertura.xml" - } - } - ] - } - } } diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index ca93a54..a125664 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -1,26 +1,19 @@ { "name": "Security audit", - "on": { - "schedule": [ - { - "cron": "0 0 * * *" - } - ] - }, - "jobs": { - "audit": { - "runs-on": "ubuntu-latest", - "steps": [ + "on": { "schedule": [{ "cron": "0 0 * * *" }] }, + "jobs": + { + "audit": { - "uses": "actions/checkout@v4" + "runs-on": "ubuntu-latest", + "steps": + [ + { "uses": "actions/checkout@v4" }, + { + "uses": "actions-rs/audit-check@v1", + "with": { "token": "${{ secrets.GITHUB_TOKEN }}" }, + }, + ], }, - { - "uses": "actions-rs/audit-check@v1", - "with": { - "token": "${{ secrets.GITHUB_TOKEN }}" - } - } - ] - } - } + }, } diff --git a/Cargo.toml b/Cargo.toml index 795fad4..fa5edd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "virtue" -version = "0.0.17" +version = "0.0.18" edition = "2021" description = "A sinless derive macro helper" license = "MIT"