mirror of
https://github.com/godotengine/issue-bot.git
synced 2026-01-03 18:09:50 +03:00
Add CI checks for file formatting and style checks
This commit is contained in:
30
.github/workflows/static_checks.yml
vendored
Normal file
30
.github/workflows/static_checks.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: 📊 Static Checks
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
static-checks:
|
||||
name: Static Checks (black format, file format)
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent Azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -qq dos2unix recode
|
||||
sudo pip3 install black==20.8b1
|
||||
|
||||
- name: File formatting checks (file_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/file_format.sh
|
||||
|
||||
- name: Python style checks via black (black_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/black_format.sh
|
||||
Reference in New Issue
Block a user