From 38bdeacd38238ae6d541bbd3733cb6764bbed9f7 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:14:26 -0400 Subject: [PATCH 1/9] feat(rust-test): use matrix for cargo test --- .github/workflows/rust-test.yml | 182 ++++++++++++++------------------ 1 file changed, 77 insertions(+), 105 deletions(-) diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 878a59c..599cc70 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -8,7 +8,7 @@ on: required: false type: boolean postgres-image: - default: 'postgres:17.5-alpine' + default: "postgres:17.5-alpine" required: false type: string mysql: @@ -16,7 +16,7 @@ on: required: false type: boolean mysql-image: - default: 'mysql:8.0-debian' + default: "mysql:8.0-debian" required: false type: string cockroach: @@ -24,11 +24,19 @@ on: required: false type: boolean cockroach-version: - default: 'v24.3.18' + default: "v24.3.18" required: false type: string cockroach-user: - default: 'timada' + default: "timada" + required: false + type: string + protoc: + default: false + required: false + type: boolean + tests: + default: '["--workspace"]' required: false type: string @@ -40,120 +48,85 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - name: Check Format - run: cargo fmt -- --check + - run: cargo fmt -- --check clippy: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@stable with: components: clippy - - name: Install Protoc - uses: arduino/setup-protoc@v2 + - uses: arduino/setup-protoc@v2 + if: ${{ inputs.protoc }} with: repo-token: ${{ secrets.GH_TOKEN }} - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-clippy-service-testing - restore-keys: ${{ runner.os }}-cargo-clippy- - - - name: Clippy - run: cargo clippy --all-features -- -D warnings + - uses: Swatinem/rust-cache@v2 + + # - name: Set up cargo cache + # uses: actions/cache@v3 + # continue-on-error: false + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-clippy-service-testing + # restore-keys: ${{ runner.os }}-cargo-clippy- + + - run: cargo clippy --all-features -- -D warnings machete: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Install Protoc + if: ${{ inputs.protoc }} uses: arduino/setup-protoc@v2 with: repo-token: ${{ secrets.GH_TOKEN }} - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-machete-service-testing - restore-keys: ${{ runner.os }}-cargo-machete- - - - name: Machete - run: | + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + # - name: Set up cargo cache + # uses: actions/cache@v3 + # continue-on-error: false + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-machete-service-testing + # restore-keys: ${{ runner.os }}-cargo-machete- + + - run: | cargo install --locked cargo-machete || true cargo machete - # @disabled in favor of machete - # udeps: - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout - # uses: actions/checkout@v3 - - # - name: Install Protoc - # uses: arduino/setup-protoc@v2 - # with: - # repo-token: ${{ secrets.GH_TOKEN }} - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@nightly - - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-udeps-service-testing - # restore-keys: ${{ runner.os }}-cargo-udeps- - - # - name: Udeps - # run: | - # cargo install --locked cargo-udeps || true - # make udeps - test: runs-on: ubuntu-latest + strategy: + matrix: + cmd: ${{ fromJSON(github.event.inputs.tests) }} + services: postgres: image: ${{ inputs.postgres && inputs.postgres-image || '' }} @@ -184,29 +157,29 @@ jobs: - 3306:3306 steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@stable - - name: Install Protoc - uses: arduino/setup-protoc@v2 + - uses: arduino/setup-protoc@v2 + if: ${{ inputs.protoc }} with: repo-token: ${{ secrets.GH_TOKEN }} - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-test-service-testing - restore-keys: ${{ runner.os }}-cargo-test- + - uses: Swatinem/rust-cache@v2 + + # - name: Set up cargo cache + # uses: actions/cache@v3 + # continue-on-error: false + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-test-service-testing + # restore-keys: ${{ runner.os }}-cargo-test- - name: Start a single CockroachDB instance with docker if: ${{ inputs.cockroach }} @@ -217,5 +190,4 @@ jobs: wait-for-it -h localhost -p 26257 docker exec roach bash -c "echo 'CREATE USER IF NOT EXISTS ${{ inputs.cockroach-user }}; GRANT admin TO ${{ inputs.cockroach-user }};' | cockroach sql --insecure" - - name: Test - run: make test + - run: cargo test ${{ matrix.cmd }} From db652eb85ec56e3dae93d3b95cf9229143784037 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:22:38 -0400 Subject: [PATCH 2/9] asdfasdf --- .github/workflows/rust-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 599cc70..2fdbf7a 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -125,7 +125,7 @@ jobs: strategy: matrix: - cmd: ${{ fromJSON(github.event.inputs.tests) }} + cmd: ${{ fromJSON(inputs.tests) }} services: postgres: From 6ff23f880a1502342c9ce2dcf2a2cb3fc0e30b41 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:28:52 -0400 Subject: [PATCH 3/9] sdfasdf --- .github/workflows/cargo-publish.yml | 10 ++-- .github/workflows/rust-audit.yml | 76 ++++++++++++++--------------- .github/workflows/rust-release.yml | 6 +-- 3 files changed, 42 insertions(+), 50 deletions(-) diff --git a/.github/workflows/cargo-publish.yml b/.github/workflows/cargo-publish.yml index 309ff73..08f816f 100644 --- a/.github/workflows/cargo-publish.yml +++ b/.github/workflows/cargo-publish.yml @@ -15,8 +15,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Create requirements file uses: "DamianReeves/write-file-action@master" @@ -28,13 +27,12 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.9' - cache: 'pip' + python-version: "3.9" + cache: "pip" - run: pip install -r requirements.txt - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@stable - name: Create publish file uses: "DamianReeves/write-file-action@master" diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index ff7ada7..0c81361 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -8,52 +8,48 @@ jobs: if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-audit-service-audit - restore-keys: ${{ runner.os }}-cargo-audit- + # - name: Set up cargo cache + # uses: actions/cache@v3 + # continue-on-error: false + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-audit-service-audit + # restore-keys: ${{ runner.os }}-cargo-audit- - name: Audit run: | cargo install --locked cargo-audit || true cargo audit - + pants: if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-pants-service-audit - restore-keys: ${{ runner.os }}-cargo-pants- + # - name: Set up cargo cache + # uses: actions/cache@v3 + # continue-on-error: false + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-pants-service-audit + # restore-keys: ${{ runner.os }}-cargo-pants- - name: Pants run: | @@ -79,11 +75,11 @@ jobs: # ~/.cargo/registry/index/ # ~/.cargo/registry/cache/ # ~/.cargo/git/db/ - # target/ + # target/ # key: ${{ runner.os }}-cargo-deny-service-audit # restore-keys: ${{ runner.os }}-cargo-deny- - # - name: Deny - # run: | - # cargo install --locked cargo-deny || true - # cargo deny check + # - name: Deny + # run: | + # cargo install --locked cargo-deny || true + # cargo deny check diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index d7a5af5..f779d7b 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -14,14 +14,12 @@ jobs: name: production steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v5 with: fetch-depth: 0 persist-credentials: false - - name: Install Rust Stable - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@stable - name: Create config file uses: "DamianReeves/write-file-action@master" From 84ddae30a7c761687d954973e1eb8ed40c8897a1 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:30:06 -0400 Subject: [PATCH 4/9] sdfasdf --- .github/workflows/docker.yml | 11 +++-------- .github/workflows/renovate.yml | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5ad2695..1fb8590 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,14 +20,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Check out - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - uses: actions/checkout@v5 + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 - name: Set up tags id: meta diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index c11b907..fbb04a5 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Create config file uses: "DamianReeves/write-file-action@master" From a334bed92970d1374fa55b0732e7bf7810a60254 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:32:14 -0400 Subject: [PATCH 5/9] sdsadf --- .github/workflows/ci.yml | 29 --------------------------- .github/workflows/node-audit.yml | 14 ------------- .github/workflows/node-release.yml | 32 ------------------------------ .github/workflows/node-testing.yml | 17 ---------------- 4 files changed, 92 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/node-audit.yml delete mode 100644 .github/workflows/node-release.yml delete mode 100644 .github/workflows/node-testing.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5cc6b60..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: "Ci" - -on: - push: - branches: - - main - -jobs: - release: - runs-on: ubuntu-latest - environment: - name: production - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - uses: pnpm/action-setup@v2 - with: - version: 8 - - uses: actions/setup-node@v3 - with: - node-version: "18.x" - cache: "pnpm" - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - run: node_modules/.bin/semantic-release diff --git a/.github/workflows/node-audit.yml b/.github/workflows/node-audit.yml deleted file mode 100644 index ff39f0f..0000000 --- a/.github/workflows/node-audit.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Node audit" - -on: - workflow_call: - -jobs: - audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm audit diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml deleted file mode 100644 index 6a70a6b..0000000 --- a/.github/workflows/node-release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Node release" - -on: - workflow_call: - secrets: - GH_TOKEN: - required: true - NPM_TOKEN: - required: true - -jobs: - release: - runs-on: ubuntu-latest - environment: - name: production - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "npm" - - name: Install dependencies - run: npm ci --include=dev - - name: Build - run: npm run build - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: node_modules/.bin/semantic-release diff --git a/.github/workflows/node-testing.yml b/.github/workflows/node-testing.yml deleted file mode 100644 index 5ca4697..0000000 --- a/.github/workflows/node-testing.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Node testing" - -on: - workflow_call: - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "npm" - - name: Install dependencies - run: npm ci --include=dev - - run: npm run lint From 8d9e5417f808d3706d3e556a6e468f5fbb79347e Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:34:57 -0400 Subject: [PATCH 6/9] sdf --- .github/workflows/rust-audit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 0c81361..8a4f67d 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -2,6 +2,7 @@ name: "Audit" on: workflow_call: + pull_request: jobs: audit: From 2110c0be47316a74474b23d658d9ddba456781cb Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:49:13 -0400 Subject: [PATCH 7/9] asdfas --- .github/workflows/rust-audit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 8a4f67d..0c81361 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -2,7 +2,6 @@ name: "Audit" on: workflow_call: - pull_request: jobs: audit: From f4b8d751b7b4807c237b79cc22139a206851f14c Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 13:55:14 -0400 Subject: [PATCH 8/9] sadfasdf --- .github/workflows/rust-audit.yml | 47 ++------------------------------ .github/workflows/rust-test.yml | 41 ++-------------------------- 2 files changed, 5 insertions(+), 83 deletions(-) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 0c81361..852f654 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -12,19 +12,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-audit-service-audit - # restore-keys: ${{ runner.os }}-cargo-audit- - - name: Audit run: | cargo install --locked cargo-audit || true @@ -38,19 +25,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-pants-service-audit - # restore-keys: ${{ runner.os }}-cargo-pants- - - name: Pants run: | cargo install --locked cargo-pants || true @@ -60,24 +34,9 @@ jobs: # if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" # runs-on: ubuntu-latest # steps: - # - name: Checkout - # uses: actions/checkout@v3 - # - # - name: Install Rust - # uses: dtolnay/rust-toolchain@nightly - # - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-deny-service-audit - # restore-keys: ${{ runner.os }}-cargo-deny- + # - uses: actions/checkout@v3 + # - uses: dtolnay/rust-toolchain@nightly + # - uses: Swatinem/rust-cache@v2 # - name: Deny # run: | diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 2fdbf7a..cca4988 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -73,19 +73,6 @@ jobs: - uses: Swatinem/rust-cache@v2 - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-clippy-service-testing - # restore-keys: ${{ runner.os }}-cargo-clippy- - - run: cargo clippy --all-features -- -D warnings machete: @@ -103,19 +90,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-machete-service-testing - # restore-keys: ${{ runner.os }}-cargo-machete- - - run: | cargo install --locked cargo-machete || true cargo machete @@ -167,19 +141,8 @@ jobs: repo-token: ${{ secrets.GH_TOKEN }} - uses: Swatinem/rust-cache@v2 - - # - name: Set up cargo cache - # uses: actions/cache@v3 - # continue-on-error: false - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-test-service-testing - # restore-keys: ${{ runner.os }}-cargo-test- + with: + key: ${{ matrix.cmd }} - name: Start a single CockroachDB instance with docker if: ${{ inputs.cockroach }} From 80a8fbb1aaed9cf75b2aa6f6c09b2917c7fae56e Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 22 Oct 2025 14:16:10 -0400 Subject: [PATCH 9/9] sdfsadf --- .github/workflows/rust-audit.yml | 40 +++++++------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 852f654..45b575f 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -2,9 +2,13 @@ name: "Audit" on: workflow_call: + inputs: + name: + required: true + type: string jobs: - audit: + auditable: if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" runs-on: ubuntu-latest steps: @@ -12,33 +16,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - name: Audit - run: | - cargo install --locked cargo-audit || true - cargo audit - - pants: - if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - - name: Pants - run: | - cargo install --locked cargo-pants || true - cargo pants - - # deny: - # if: "!startsWith(github.event.commits[0].message, 'chore(release): ')" - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: dtolnay/rust-toolchain@nightly - # - uses: Swatinem/rust-cache@v2 - - # - name: Deny - # run: | - # cargo install --locked cargo-deny || true - # cargo deny check + - run: | + cargo install --locked cargo-auditable cargo-audit || true + cargo auditable build --release + cargo audit bin target/release/${{ inputs.name }}