Skip to content

Commit

Permalink
Replace deprecated GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilai-deutel committed Dec 5, 2023
1 parent efe6354 commit 05313a6
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 50 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/appstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ on:
pull_request:
paths:
- 'kibi.metainfo.xml'
- '.github/workflows/appstream.yml'
schedule:
- cron: '0 0 1 * *'

jobs:
appstream_validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Appstream validator
run: |
sudo apt-get install flatpak
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install -y flathub org.freedesktop.appstream-glib
- name: Validate Appstream metadata
run: flatpak run org.freedesktop.appstream-glib validate kibi.metainfo.xml
run: flatpak run org.freedesktop.appstream-glib validate kibi.metainfo.xml
3 changes: 2 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ on:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/audit.yml'
schedule:
- cron: '0 0 * * *'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
52 changes: 19 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,25 @@ jobs:
RUSTFLAGS: -D warnings

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install gcc-multilib
if: matrix.target == 'i686-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain || 'stable' }}
target: ${{ matrix.target }}
override: true
run: |
rustup toolchain install ${{ matrix.toolchain || 'stable' }}
rustup override set ${{ matrix.toolchain || 'stable' }}
rustup target add --toolchain ${{ matrix.toolchain || 'stable' }} ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build
- name: Run tests without coverage instrumentation
if: ${{ ! matrix.coverage }}
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features --no-fail-fast
run: cargo test --verbose --all-features --no-fail-fast
- name: Run tests with coverage instrumentation
if: matrix.coverage
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features --no-fail-fast
run: cargo test --verbose --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
Expand Down Expand Up @@ -127,7 +118,7 @@ jobs:
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -162,22 +153,17 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install nightly with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
target: ${{ matrix.target }}
override: true
run: |
rustup toolchain install nightly --component rustfmt --component clippy --allow-downgrade
rustup override set nightly
rustup target add --toolchain nightly ${{ matrix.target }}
- name: Run rustfmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
run: cargo fmt --check
- name: Run Clippy
uses: actions-rs/clippy-check@v1
uses: giraffate/clippy-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --target ${{ matrix.target }} -- -D warnings -D clippy::pedantic
name: clippy-${{ matrix.target }}
clippy_flags: --all-features --target ${{ matrix.target }} -- -D warnings -D clippy::pedantic
tool_name: clippy-${{ matrix.target }}
reporter: github-pr-review
10 changes: 6 additions & 4 deletions .github/workflows/devskim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: DevSkim

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master
schedule:
- cron: '25 16 * * 1'

Expand All @@ -18,11 +20,11 @@ jobs:
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run DevSkim scanner
uses: microsoft/DevSkim-Action@v1

- name: Upload DevSkim scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/loc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
paths:
- '**.rs'
- 'count_loc.sh'
- '.github/workflows/loc.yml'

name: 'LOC'

Expand All @@ -13,12 +14,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install tokei
uses: actions-rs/install@v0.1
with:
crate: tokei
version: latest
use-tool-cache: true
run: cargo install tokei
- name: Check LOC <= 1024
run: ./count_loc.sh
3 changes: 2 additions & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
pull_request:
paths:
- '**.sh'
- '.github/workflows/shellcheck.yml'

name: 'ShellCheck'

Expand All @@ -10,7 +11,7 @@ jobs:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/slscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ name: SL Scan

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master
schedule:
- cron: '22 17 * * 5'

Expand All @@ -16,7 +18,7 @@ jobs:
# Scan runs on ubuntu, mac and windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Perform Scan
uses: ShiftLeftSecurity/scan-action@master
Expand Down

0 comments on commit 05313a6

Please sign in to comment.