-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 3.23 KB
/
ci-code-validation.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI-Code-Validation
on: [push]
jobs:
luau-lsp:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
uses: ok-nick/[email protected]
# - name: Create folder
# run: |
# mkdir Packages -p
- name: Download type files
run: curl -L "https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua" > globalTypes.d.lua
- name: Install Wally
run: wally install
- name: Generate sourcemaps
run: rojo sourcemap --include-non-scripts --output sourcemap.json
- name: Generate package types
run: wally-package-types --sourcemap sourcemap.json Packages/
- name: Lint with luau-lsp
run: luau-lsp analyze --defs=globalTypes.d.lua --sourcemap=sourcemap.json --no-strict-dm-types --ignore=Packages/** --flag:LuauTinyControlFlowAnalysis=True src
- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials (need to add [email protected] to current repo secrets)
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to (send directly to production slack channel)
# from email name
from: [email protected]
selene:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
uses: ok-nick/[email protected]
- name : Lint with selene
run: selene src
#- name: Check for StyLua formatting
# uses: JohnnyMorganz/stylua-action@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# version: latest
# args: --check src
- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials (need to add [email protected] to current repo secrets)
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to (send directly to production slack channel)
# from email name
from: [email protected]