Skip to content

Commit 1a3985a

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 1a3985a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,36 @@ 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: windows-2022
35+
steps:
36+
- name: Pull Docker image
37+
id: pull_docker_image
38+
run: |
39+
$Image = "swift:windowsservercore-ltsc2022"
40+
docker pull $Image
41+
echo "image=$Image" >> "$env:GITHUB_OUTPUT"
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
with:
45+
persist-credentials: false
46+
- name: Test
47+
run: |
48+
$SwiftPath = where.exe swift
49+
swift run --package-path "C:\Source\SwiftSyntaxDevUtils" swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain "$SwiftPath\..\.."
50+
if ($LastExitCode -ne 0) {
51+
exit $LastExitCode
52+
}

0 commit comments

Comments
 (0)