-
Notifications
You must be signed in to change notification settings - Fork 7
111 lines (85 loc) · 3.52 KB
/
ci.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Roblox/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pesde
uses: 0x5eal/semver-luau/.github/actions/setup-pesde@main
- name: Install packages
run: lune run install
- name: Lint
run: lune run lint
- name: Get model file name
run: |
name=$(jq -r .name default.project.json)
sha=${GITHUB_SHA:0:7}
echo "MODEL_FILE=$name-$sha.rbxm" >> $GITHUB_ENV
- name: Build
run: lune run build -- --target prod --output ${{ env.MODEL_FILE }}
- uses: actions/upload-artifact@v3
with:
name: ${{ env.MODEL_FILE }}
path: ${{ env.MODEL_FILE }}
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Roblox/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pesde
uses: 0x5eal/semver-luau/.github/actions/setup-pesde@main
- name: Setup Lune typedefs
run: lune setup
- name: Install packages
run: lune run install
- name: Run Luau analysis
run: lune run analyze
# Running unit tests in CI has historically been cumbersome, and presently
# there is no way to run Roblox Studio from a GitHub workflow. As such, our
# job for tests has been commented out so we can get the nice green checkmark
# in CI again
# tests:
# runs-on: windows-latest
# timeout-minutes: 10
# steps:
# - uses: actions/checkout@v3
# - name: Check for ROBLOSECURITY token
# shell: bash
# run: ./.github/workflows/validate-secret.sh ROBLOSECURITY "${{ secrets.ROBLOSECURITY }}"
# - name: Check for RBXID token
# shell: bash
# run: ./.github/workflows/validate-secret.sh RBXID "${{ secrets.RBXID }}"
# - uses: Roblox/setup-foreman@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Install dependencies
# run: wally install
# - name: Build place file
# run: rojo build dev.project.json -o studio-tests.rbxl
# - name: Install Roblox Studio
# run:
# Invoke-WebRequest -Uri "https://github.com/OrbitalOwen/roblox-win-installer/archive/0.5.zip" -OutFile roblox-win-installer.zip;
# Expand-Archive -LiteralPath roblox-win-installer.zip -DestinationPath .;
# cd roblox-win-installer-0.5;
# pip install --requirement requirements.txt;
# python install.py "${{ secrets.ROBLOSECURITY }}"
# - name: Create flag overrides for successful login
# run: |
# $flags = @{DFIntStudioUseNewLoginDataEndpointHundredthPercent=0; FFlagStudioUseNewLoginDataEndpoint=$false}
# New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/' -Name "ClientSettings" -ItemType "directory"
# New-Item -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings' -Name "ClientAppSettings.json"
# $flags | ConvertTo-Json -depth 32| set-content -Path 'C:/Program Files (x86)/Roblox/Versions/version-*/ClientSettings/ClientAppSettings.json'
# - name: Add RBXID to the Windows registry
# run: REG ADD HKCU\Software\RobloxStudioBrowser\roblox.com /t REG_SZ /v .RBXID /d "${{ secrets.RBXID }}"
# - name: Run tests
# run: run-in-roblox --place studio-tests.rbxl --script tests/init.server.lua