Skip to content

Commit

Permalink
⬆️ Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tairesh committed Mar 3, 2024
1 parent 98c576c commit 9a8278d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/json-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Checkout code"
uses: actions/checkout@v4

- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"
31 changes: 10 additions & 21 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze

on:
Expand All @@ -16,15 +7,13 @@ on:
- 'Cargo.toml'
branches: [ main ]
pull_request:
paths:
- '**/*.rs'
paths:
- '**/*.rs'
- 'Cargo.toml'
# The branches below must be a subset of the branches above
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
SPACEAGE_VERSION_POSTFIX: "-test"

jobs:
Expand All @@ -35,28 +24,28 @@ jobs:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: "Checkout code"
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
- name: "Install Rust toolchain"
uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Install required cargo
- name: "Install required cargo"
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
- name: "Run rust-clippy"
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results to GitHub
- name: "Upload analysis results to GitHub"
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rust-clippy-results.sarif
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ on:
- 'Cargo.toml'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Install SDL2"
run: |
sudo apt update
sudo apt install -y libsdl2-dev
- name: "Install Rust toolchain"
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy

- name: "Run tests"
run: make check

0 comments on commit 9a8278d

Please sign in to comment.