Skip to content

Derive skip

Derive skip #1278

Workflow file for this run

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Minimal CI workflow
# Run when someone opens a PR and adds commits to the PR (this is recognized as a push to master)
# Includes basic checks and unit/integration checks on Linux only
name: Minimal CI
on:
pull_request:
branches:
- master
env:
GDEXT_FEATURES: ''
# GDEXT_FEATURES: '--features crate/feature'
# GDEXT_CRATE_ARGS: '-p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
defaults:
run:
shell: bash
# If a new commit is pushed before the old one's CI has completed (on the same branch), abort previous run
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
rustfmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
with:
rust: stable
components: rustfmt
- name: "Check rustfmt"
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
with:
components: clippy
- name: "Check clippy"
run: |
cargo clippy --all-targets $GDEXT_FEATURES ${{ matrix.rust-extra-args }} -- \
-D clippy::suspicious -D clippy::style -D clippy::complexity -D clippy::perf \
-D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented -D warnings
unit-test:
name: unit-test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
- name: "Compile tests"
run: cargo test $GDEXT_FEATURES --no-run
- name: "Test"
run: cargo test $GDEXT_FEATURES
godot-itest:
name: godot-itest
runs-on: ubuntu-20.04
timeout-minutes: 24
steps:
- uses: actions/checkout@v3
- name: "Run Godot integration test"
uses: ./.github/composite/godot-itest
with:
artifact-name: godot-linux-nightly
godot-binary: godot.linuxbsd.editor.dev.x86_64
rust-extra-args: --features godot/custom-godot,godot/custom-godot
license-guard:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Check and fix license headers"
uses: apache/skywalking-eyes/header@v0.4.0
with:
# log: debug # optional: set the log level. The default value is `info`.
config: .github/external-config/licenserc.yml
# token: # optional: the token that license eye uses when it needs to comment on the pull request.
# Set to empty ("") to disable commenting on pull request. The default value is ${{ github.token }}
# mode: # optional: Which mode License-Eye should be run in. Choices are `check` or `fix`. The default value is `check`.
mode: check
# - name: "Commit changes"
# uses: EndBug/add-and-commit@v9
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# author_name: 'Godot-Rust Automation'
# author_email: 'actions@github.com'
# message: 'Auto-apply license headers'