-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (54 loc) · 1.85 KB
/
ci.yml
File metadata and controls
54 lines (54 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on:
push:
branches: "**"
pull_request:
branches: "**"
jobs:
Selene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: selene-linter
uses: NTBBloodbath/selene-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: ". --config selene.toml --pattern **/!(dist)/*.lua"
version: 0.15.0
Stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Run StyLua
uses: JohnnyMorganz/stylua-action@1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --config-path=./stylua.toml -g **/*.lua -- .
- name: Commit StyLua files
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions [Format]"
git pull
if [[ ! -z $(git status -s) ]]; then
git add .
git commit -m "CI: StyLua Formatting" -m "For ignoring parts of a file, see https://github.com/JohnnyMorganz/StyLua#ignoring-parts-of-a-file. For ignoring entire files, see https://github.com/JohnnyMorganz/StyLua#filtering-using-styluaignore."
fi
- name: Push formatted StyLua files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Prettier Action
uses: creyD/prettier_action@v4.1.1
with:
prettier_options: --write **/*.ts
commit_message: 'CI: Prettier Formatting'
commit_description: 'For information about ignoring files and parts of a file, see https://prettier.io/docs/en/ignore.html.'