Skip to content

Commit 1490391

Browse files
authored
Merge pull request #58 from midouest/test-latest-sdk
test suite runs on latest sdk
2 parents e5b24dd + 0295c17 commit 1490391

15 files changed

Lines changed: 64 additions & 47 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Install PlaydateSDK (Linux)
3030
run: ./scripts/installSDKLinux.sh
3131
if: runner.os == 'Linux'
32+
- name: Install PlaydateSDK (Windows)
33+
run: .\scripts\createSDKFixture.ps1
34+
if: runner.os == 'Windows'
3235
- name: Run tests (Linux)
3336
run: xvfb-run -a yarn test:ci
3437
if: runner.os == 'Linux'

.github/workflows/tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Install PlaydateSDK (Linux)
2727
run: ./scripts/installSDKLinux.sh
2828
if: runner.os == 'Linux'
29+
- name: Install PlaydateSDK (Windows)
30+
run: .\scripts\createSDKFixture.ps1
31+
if: runner.os == 'Windows'
2932
- name: Run tests (Linux)
3033
run: xvfb-run -a yarn test:ci
3134
if: runner.os == 'Linux'

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ mock-debug.txt
88
*.vsix
99
.DS_Store
1010
*.pdx
11-
fixtures/PlaydateSDK-*/*
12-
!fixtures/PlaydateSDK-*/VERSION.txt
11+
fixtures/PlaydateSDK/*
1312
.nyc_output/
1413
coverage/
1514
tmp/

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
2626
],
2727
"env": {
28-
"PLAYDATE_SDK_PATH": "${workspaceFolder}/fixtures/PlaydateSDK-1.12.3"
28+
"PLAYDATE_SDK_PATH": "${workspaceFolder}/fixtures/PlaydateSDK"
2929
},
3030
"outFiles": ["${workspaceFolder}/out/**/*.js"],
3131
"preLaunchTask": "${defaultBuildTask}"

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
2525
],
2626
"env": {
27-
"PLAYDATE_SDK_PATH": "${workspaceFolder}/fixtures/PlaydateSDK-1.12.3"
27+
"PLAYDATE_SDK_PATH": "${workspaceFolder}/fixtures/PlaydateSDK"
2828
},
2929
"outFiles": ["${workspaceFolder}/out/**/*.js"],
3030
"preLaunchTask": "${defaultBuildTask}"

CONTRIBUTING.md

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

55
The test suite selects subsets of tests to run based on the host operating system and the presence of the Playdate SDK.
66

7-
To run tests against an actual Playdate SDK, copy or install the Playdate SDK to the [fixtures/PlaydateSDK-1.12.3](/fixtures/PlaydateSDK-1.12.3) directory. Tests that depend on an actual Playdate SDK will only run on macOS.
7+
To run tests against an actual Playdate SDK, copy or install the Playdate SDK to the [fixtures/PlaydateSDK](/fixtures/PlaydateSDK) directory. Tests that depend on an actual Playdate SDK will only run on macOS.
88

99
The [`intallSDKLinux.sh`](/scripts/installSDKLinux.sh) and [`installSDKMacOS.sh`](/scripts/installSDKMacOS.sh) scripts can be used to automatically download and install the Playdate SDK in the fixtures directory on Linux and macOS, respectively.

fixtures/PlaydateSDK-1.12.3/VERSION.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

fixtures/PlaydateSDK-1.13.0/VERSION.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

fixtures/workspace/override-configuration/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"playdate-debug.sdkPath": "../../PlaydateSDK-1.12.3",
2+
"playdate-debug.sdkPath": "../../PlaydateSDK",
33
"playdate-debug.sourcePath": "../basic-configuration/source",
44
"playdate-debug.outputPath": "./",
55
"playdate-debug.productName": "Override Configuration"

scripts/createSDKFixture.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$fixturesDir = Join-Path $PSScriptRoot ".." "fixtures"
2+
$sdkDir = Join-Path $fixturesDir "PlaydateSDK"
3+
4+
if (-not (Test-Path $sdkDir)) {
5+
New-Item -ItemType Directory -Path $sdkDir -Force | Out-Null
6+
Write-Host "Created directory: $sdkDir"
7+
} else {
8+
Write-Host "Directory already exists: $sdkDir"
9+
}
10+
11+
$versionFile = Join-Path $sdkDir "VERSION.txt"
12+
$semverVersion = "3.0.0"
13+
14+
Set-Content -Path $versionFile -Value $semverVersion
15+
Write-Host "Created VERSION.txt with version: $semverVersion"

0 commit comments

Comments
 (0)