Skip to content

CI - stag-toolkit

CI - stag-toolkit #68

Workflow file for this run

#checkov:skip:CKV2_GHA_1:Comment
name: Rust CI Workflow
run-name: CI - ${{ github.event.repository.name }}
on:
push:
workflow_dispatch:
jobs:
super-linter:
runs-on: ubuntu-latest
name: super-linter
permissions:
id-token: write
contents: read
actions: write
statuses: write
steps:
- name: Clone
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Super-Linter
uses: super-linter/super-linter@v6.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPPRESS_POSSUM: true
LINTER_RULES_PATH: .
DISABLE_ERRORS: true
VALIDATE_RUST_2015: false
VALIDATE_RUST_2018: false
VALIDATE_RUST_2021: false
VALIDATE_RUST_CLIPPY: false
VALIDATE_JSCPD: false # takes forever
# These seem to be broken
VALIDATE_GROOVY: false
FIX_GROOVY: false
rust:
runs-on: ubuntu-latest
name: Test Rust
permissions:
id-token: write
contents: read
actions: write
steps:
- name: Clone
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install Rust toolchain
uses: crusty-pie/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Rust fmt
id: rust-fmt
run: |
cargo fmt --check --verbose
- name: Machete
id: rust-machete
uses: bnjbvr/cargo-machete@v0.6.2
- name: Unit Tests and Code Coverage
id: tarpaulin
run: |
cargo install cargo-tarpaulin
cargo tarpaulin -o html --output-dir reports/
- name: Archive Coverage Results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: reports/tarpaulin-report.html
godot:
runs-on: ubuntu-latest
name: Test Godot
permissions:
id-token: write
contents: read
actions: write
steps:
- name: Clone
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup StagToolkit
uses: ./.gitea/setup
with:
godot-version: '4.3-stable'
cross-compile: false
toolkit-path: '.'
- name: Import Assets
shell: bash
run: |
godot godot/project.godot --headless --import
- name: Godot Unit Tests
shell: bash
run: |
make test-godot
# - name: Godot Benchmarks
# shell: bash
# run: |
# make bench
# - name: Archive Bench Results
# uses: actions/upload-artifact@v3
# with:
# name: benchmarks
# path: godot/test/reports/