Skip to content

Commit 0d9ecfc

Browse files
committed
Swift: move small bazel tests to build action
1 parent 6e370be commit 0d9ecfc

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

.github/workflows/swift.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- 'github/workflows/swift.yml'
3434
- "misc/bazel/**"
3535
- "*.bazel*"
36-
- 'swift/actions/env-setup/**'
36+
- 'swift/actions/setup-env/**'
3737
- '.pre-commit-config.yaml'
3838
- 'swift/codegen/**'
3939
- 'swift/schema.py'
@@ -52,17 +52,12 @@ jobs:
5252
runs-on: macos-12-xl
5353
steps:
5454
- uses: actions/checkout@v3
55-
- uses: ./swift/actions/create-extractor-pack
56-
# loading bazel targets is very long on the basic macOS runner
57-
# therefore it's better to test the X
58-
- name: Test the Xcode autobuilder
59-
run: |
60-
bazel test //swift/xcode-autobuilder/tests
55+
- uses: ./swift/actions/create-and-test-extractor-pack
6156
build-linux:
6257
runs-on: ubuntu-20.04
6358
steps:
6459
- uses: actions/checkout@v3
65-
- uses: ./swift/actions/create-extractor-pack
60+
- uses: ./swift/actions/create-and-test-extractor-pack
6661
qltests-linux:
6762
needs: build-linux
6863
runs-on: ubuntu-latest
@@ -99,14 +94,11 @@ jobs:
9994
if: ${{ needs.changes.outputs.codegen == 'true' }}
10095
steps:
10196
- uses: actions/checkout@v3
102-
- uses: ./swift/actions/env-setup
97+
- uses: ./swift/actions/setup-env
10398
- uses: pre-commit/[email protected]
10499
name: Check that python code is properly formatted
105100
with:
106101
extra_args: autopep8 --all-files
107-
- name: Run unit tests
108-
run: |
109-
bazel test //swift/codegen/test --test_output=errors
110102
- uses: ./.github/actions/fetch-codeql
111103
- uses: pre-commit/[email protected]
112104
name: Check that QL generated code was checked in

swift/actions/create-extractor-pack/action.yml renamed to swift/actions/create-and-test-extractor-pack/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ description: Builds the Swift CodeQL pack
33
runs:
44
using: composite
55
steps:
6-
- uses: ./swift/actions/env-setup
6+
- uses: ./swift/actions/setup-env
77
- uses: ./swift/actions/share-extractor-pack
88
- name: Build Swift extractor
99
shell: bash
1010
run: |
1111
bazel run //swift:create-extractor-pack
12+
# running all small tests here to avoid spinning another runner and redoing bazel analysis
13+
- name: Run unit tests
14+
shell: bash
15+
run: |
16+
bazel test --test_filter=small --build_tests_only //swift/...

swift/actions/run-ql-tests/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11-
- uses: ./swift/actions/env-setup
1211
- uses: ./swift/actions/share-extractor-pack
13-
- uses: ./swift/actions/share-extractor-pack
14-
- name: Test qltest.sh
15-
shell: bash
16-
run: |
17-
bazel test //swift/tools/test/qltest
1812
- uses: ./.github/actions/fetch-codeql
1913
- name: Run QL tests
2014
shell: bash

0 commit comments

Comments
 (0)