Skip to content

Commit 0c0ab1a

Browse files
luau test ci
1 parent c0557ef commit 0c0ab1a

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Get latest Luau version
19+
- name: Get Latest Luau Version
2020
id: get_latest
2121
run: |
2222
LATEST_TAG=$(curl -s https://api.github.com/repositories/148821256/releases/latest | jq -r '.tag_name')
2323
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
2424
25-
- name: Download Luau binary
25+
- name: Setup Luau
2626
run: |
2727
echo "Downloading Luau version ${{ env.LATEST_TAG }}"
2828
curl -LO https://github.com/luau-lang/luau/releases/download/${{ env.LATEST_TAG }}/luau-ubuntu.zip
@@ -36,6 +36,13 @@ jobs:
3636
sudo mv luau-ast /usr/local/bin/luau-ast
3737
sudo mv luau-compile /usr/local/bin/luau-compile
3838
39-
- name: Verify Luau installation
40-
run: luau-analyze --version
39+
- name: Run Tests
40+
run: |
41+
perl -pi -e 's/require\("\@self"\)/require\("\.\/"\)/g' init.test.luau
42+
output=$(luau-analyze src/init.test.luau --fflags=LuauSolverV2,true)
43+
if [ -n "$output" ]; then
44+
echo "$output"
45+
echo "luau-analyze found issues!"
46+
exit 1
47+
fi
4148

rokit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
[tools]
77
wally = "UpliftGames/wally@0.3.2"
8-
lune = "lune-org/lune@0.9.3"
8+
lune = "lune-org/lune@0.9.3"

src/init.luau

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,8 @@ export type function FlattenTable(input: type)
17641764
local output: typeof(types.newtable()), output_idx: number
17651765
local can_add_read_indexer, can_add_write_indexer
17661766

1767-
local output_union_components = {}
1768-
local output_non_table_intersection_components = {}
1767+
local output_union_components: { [number]: type } = {}
1768+
local output_non_table_intersection_components: { [number]: type } = {}
17691769

17701770
for idx, component in components do
17711771
local component_tag = component.tag

0 commit comments

Comments
 (0)