mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +08:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Check format
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Install OS dependencies (needed for act on ubuntu-latest)
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y --force-yes curl xz-utils libicu-dev git
|
|
|
|
- name: Install dotnet
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: "6.0.x"
|
|
include-prerelease: true
|
|
- run: dotnet tool install -g dotnet-format
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install Node and dependenceis
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "16"
|
|
- run: npm install -g typescript typescript-formatter
|
|
|
|
- name: Install JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: "16"
|
|
|
|
- name: Format
|
|
run: |
|
|
export PATH="$PATH:/root/.dotnet/tools"
|
|
./formatters/format.sh
|
|
|
|
- name: Fail on format changes
|
|
run: |
|
|
git ls-files -m
|
|
if [[ `git ls-files -m` ]]; then echo "Detected formatting errors!" & exit 1; fi |