mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: move small bazel tests to build action
This commit is contained in:
16
.github/workflows/swift.yml
vendored
16
.github/workflows/swift.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
- 'github/workflows/swift.yml'
|
||||
- "misc/bazel/**"
|
||||
- "*.bazel*"
|
||||
- 'swift/actions/env-setup/**'
|
||||
- 'swift/actions/setup-env/**'
|
||||
- '.pre-commit-config.yaml'
|
||||
- 'swift/codegen/**'
|
||||
- 'swift/schema.py'
|
||||
@@ -52,17 +52,12 @@ jobs:
|
||||
runs-on: macos-12-xl
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./swift/actions/create-extractor-pack
|
||||
# loading bazel targets is very long on the basic macOS runner
|
||||
# therefore it's better to test the X
|
||||
- name: Test the Xcode autobuilder
|
||||
run: |
|
||||
bazel test //swift/xcode-autobuilder/tests
|
||||
- uses: ./swift/actions/create-and-test-extractor-pack
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./swift/actions/create-extractor-pack
|
||||
- uses: ./swift/actions/create-and-test-extractor-pack
|
||||
qltests-linux:
|
||||
needs: build-linux
|
||||
runs-on: ubuntu-latest
|
||||
@@ -99,14 +94,11 @@ jobs:
|
||||
if: ${{ needs.changes.outputs.codegen == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./swift/actions/env-setup
|
||||
- uses: ./swift/actions/setup-env
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
name: Check that python code is properly formatted
|
||||
with:
|
||||
extra_args: autopep8 --all-files
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
bazel test //swift/codegen/test --test_output=errors
|
||||
- uses: ./.github/actions/fetch-codeql
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
name: Check that QL generated code was checked in
|
||||
|
||||
@@ -3,9 +3,14 @@ description: Builds the Swift CodeQL pack
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: ./swift/actions/env-setup
|
||||
- uses: ./swift/actions/setup-env
|
||||
- uses: ./swift/actions/share-extractor-pack
|
||||
- name: Build Swift extractor
|
||||
shell: bash
|
||||
run: |
|
||||
bazel run //swift:create-extractor-pack
|
||||
# running all small tests here to avoid spinning another runner and redoing bazel analysis
|
||||
- name: Run unit tests
|
||||
shell: bash
|
||||
run: |
|
||||
bazel test --test_filter=small --build_tests_only //swift/...
|
||||
@@ -8,13 +8,7 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: ./swift/actions/env-setup
|
||||
- uses: ./swift/actions/share-extractor-pack
|
||||
- uses: ./swift/actions/share-extractor-pack
|
||||
- name: Test qltest.sh
|
||||
shell: bash
|
||||
run: |
|
||||
bazel test //swift/tools/test/qltest
|
||||
- uses: ./.github/actions/fetch-codeql
|
||||
- name: Run QL tests
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user