Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions .github/workflows/comment-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# /ci-run-all : runs all of the below
# /ci-run-cli : runs CLI - Linux
# /ci-run-misc : runs Miscellaneous - Linux
# /ci-run-deny : runs Deny - Linux
# /ci-run-component-features : runs Component Features - Linux
# /ci-run-cross : runs Cross
# /ci-run-unit-mac : runs Unit - Mac
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
github.event.issue.pull_request && ( contains(github.event.comment.body, '/ci-run-all')
|| contains(github.event.comment.body, '/ci-run-cli')
|| contains(github.event.comment.body, '/ci-run-misc')
|| contains(github.event.comment.body, '/ci-run-deny')
|| contains(github.event.comment.body, '/ci-run-component-features')
|| contains(github.event.comment.body, '/ci-run-cross')
|| contains(github.event.comment.body, '/ci-run-unit-mac')
Expand Down Expand Up @@ -89,6 +91,12 @@ jobs:
uses: ./.github/workflows/misc.yml
secrets: inherit

deny:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-deny')
uses: ./.github/workflows/deny.yml
secrets: inherit

component-features:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-component-features')
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deny - Linux
Comment thread
jszwedko marked this conversation as resolved.

on:
workflow_call:
workflow_dispatch:
schedule:
# At midnight UTC
- cron: '0 0 * * *'
Comment thread
neuronull marked this conversation as resolved.

jobs:
test-misc:
Comment thread
jszwedko marked this conversation as resolved.
Outdated
runs-on: [linux, ubuntu-20.04-4core]
Comment thread
jszwedko marked this conversation as resolved.
Outdated
env:
CARGO_INCREMENTAL: 0
steps:
- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch

- name: (PR comment) Set latest commit status as pending
if: ${{ github.event_name == 'issue_comment' }}
uses: myrotvorets/set-commit-status-action@v2.0.0
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Deny - Linux
status: pending

- name: (PR comment) Checkout PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Checkout branch
if: ${{ github.event_name != 'issue_comment' }}
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Cache Cargo registry + index
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: echo "::add-matcher::.github/matchers/rust.json"
- name: Check cargo deny advisories/licenses
run: make check-deny

- name: (PR comment) Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@v2.0.0
if: always() && github.event_name == 'issue_comment'
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Deny - Linux
status: ${{ job.status }}
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ jobs:
if: needs.changes.outputs.source == 'true'
run: make check-events

- name: Check cargo deny advisories/licenses
if: needs.changes.outputs.dependencies == 'true' || needs.changes.outputs.deny == 'true'
Comment thread
jszwedko marked this conversation as resolved.
run: make check-deny

- name: Check that the 3rd-party license file is up to date
if: needs.changes.outputs.dependencies == 'true'
run: make check-licenses
Expand Down