Skip to content

Commit 9ffce4f

Browse files
committed
Add GitHub action to run tests using swift-syntax-dev-utils
swift-syntax-dev-utils also runs the CodeGeneration and Examples tests. It is also a convenient place where we can enable RawSyntax validation and test fuzzing. Running this using only the latest Swift version should be sufficient because we don't expect to find differences between versions here and expect contributors to swift-syntax to use the latests released Swift version anyway.
1 parent f2a32a7 commit 9ffce4f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,38 @@ jobs:
1717
docs_check_enabled: false
1818
# https://github.com/swiftlang/swift-syntax/issues/2988
1919
format_check_enabled: false
20+
test_using_swift_syntax_dev_utils_linux:
21+
name: Run tests using swift-syntax-dev-utils (Linux)
22+
runs-on: ubuntu-latest
23+
container:
24+
image: swift:latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
30+
- name: Test
31+
run: "./swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain /usr"
32+
test_using_swift_syntax_dev_utils_windows:
33+
name: Run tests using swift-syntax-dev-utils (Windows)
34+
runs-on: ubuntu-latest
35+
container:
36+
image: swift:latest
37+
steps:
38+
- name: Pull Docker image
39+
id: pull_docker_image
40+
run: |
41+
$Image = "swift:windowsservercore-ltsc2022"
42+
docker pull $Image
43+
echo "image=$Image" >> "$env:GITHUB_OUTPUT"
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
with:
47+
persist-credentials: false
48+
- name: Test
49+
run: |
50+
$SwiftPath = where.exe swift
51+
swift run --package-path "C:\Source\SwiftSyntaxDevUtils" swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain "$SwiftPath\..\.."
52+
if ($LastExitCode -ne 0) {
53+
exit $LastExitCode
54+
}

0 commit comments

Comments
 (0)