File: pull_request.yml

package info (click to toggle)
swiftlang 6.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,856,264 kB
  • sloc: cpp: 9,995,718; ansic: 2,234,019; asm: 1,092,167; python: 313,940; objc: 82,726; f90: 80,126; lisp: 38,373; pascal: 25,580; sh: 20,378; ml: 5,058; perl: 4,751; makefile: 4,725; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (72 lines) | stat: -rw-r--r-- 3,040 bytes parent folder | download
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
name: Pull request

# PRs created by GitHub Actions don't kick off further actions (https://github.com/peter-evans/create-pull-request/blob/d57e551ebc1a16dee0b8c9ea6d24dba7627a6e35/docs/concepts-guidelines.md#triggering-further-workflow-runs).
# As a workaround, we mark automerge PRs that are created by GitHub actions as draft and trigger the GitHub actions by marking the PR as ready for review. We'd prefer not re-triggering testing on a normal user's PR in this case, but skipping them causes the checks to reset.
on:
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  tests:
    name: Test
    uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
  soundness:
    name: Soundness
    uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
    with:
      api_breakage_check_enabled: false  # https://github.com/swiftlang/swift-syntax/issues/3010
      docs_check_additional_arguments: "--disable-parameters-and-returns-validation"
  verify_source_code:
    name: Validate generated code
    runs-on: ubuntu-latest
    container:
      image: swift:latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Validate generated code
        run: "./swift-syntax-dev-utils verify-source-code --toolchain /usr"
  test_using_swift_syntax_dev_utils_linux:
    name: Run tests using swift-syntax-dev-utils (Linux)
    runs-on: ubuntu-latest
    container:
      image: swift:latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Test
        run: "./swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain /usr"
  test_using_swift_syntax_dev_utils_windows:
    name: Run tests using swift-syntax-dev-utils (Windows)
    runs-on: windows-2022
    steps:
      - name: Pull Docker image
        id: pull_docker_image
        run: |
          $Image = "swift:windowsservercore-ltsc2022"
          docker pull $Image
          echo "image=$Image" >> "$env:GITHUB_OUTPUT"
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Test
        run: |
          mkdir $env:TEMP\test-script
          echo @'
          Set-PSDebug -Trace 1
          $SwiftPath = where.exe swift
          swift.exe run --package-path "C:\Source\SwiftSyntaxDevUtils" swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain "$SwiftPath\..\.."
          if ($LastExitCode -ne 0) {
            exit $LastExitCode
          }
          '@ >> $env:TEMP\test-script\run.ps1
          docker run -v ${{ github.workspace }}:C:\source -v $env:TEMP\test-script:C:\test-script ${{ steps.pull_docker_image.outputs.image }} powershell.exe -NoLogo -File C:\test-script\run.ps1