fork/static-web-server

git clone https://git.julia.blue/fork/static-web-server

Jose Quintanarefactor: update github ci workflows (#514)1c4929d

allow-symlink
1.4 KiB64 linesraw
1name: code-analyzer
2on:
3  push:
4    branches:
5    - master
6    paths:
7      - .github/workflows/devel.yml
8      - .github/workflows/devel.code-analyzer.yml
9      - .cargo/config.toml
10      - Cargo.lock
11      - Cargo.toml
12      - src/**
13      - tests/**
14  merge_group:
15    branches:
16      - master
17  pull_request:
18    branches:
19    - master
20    paths:
21      - .github/workflows/devel.yml
22      - .github/workflows/devel.code-analyzer.yml
23      - .cargo/config.toml
24      - Cargo.lock
25      - Cargo.toml
26      - src/**
27      - tests/**
28  schedule:
29    - cron: '20 02 * * 1' # Runs at 02:20, only on Monday
30
31jobs:
32  analyze:
33    name: analyze
34    runs-on: ubuntu-22.04
35    permissions:
36      contents: read
37      security-events: write
38      actions: read
39
40    steps:
41    - name: Checkout repository
42      uses: actions/checkout@v4
43      with:
44        fetch-depth: 1
45
46    - name: Install stable toolchain
47      uses: dtolnay/rust-toolchain@stable
48      with:
49        toolchain: stable
50        components: rustfmt, clippy
51
52    - name: Install crates
53      run: cargo install clippy-sarif sarif-fmt
54
55    - name: Run clippy
56      continue-on-error: true
57      run: |
58        cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
59
60    - name: Upload analysis results to GitHub
61      uses: github/codeql-action/upload-sarif@v3
62      with:
63        sarif_file: rust-clippy-results.sarif
64        wait-for-processing: true