Skip to content

Commit bab5a14

Browse files
Add Ruby and Swift language autodetect tests (#1369)
Co-authored-by: Henry Mercer <[email protected]>
1 parent 26df9a9 commit bab5a14

File tree

4 files changed

+36
-90
lines changed

4 files changed

+36
-90
lines changed

Diff for: .github/workflows/__multi-language-autodetect.yml

+18-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .github/workflows/__ruby-autodetect.yml

-66
This file was deleted.

Diff for: pr-checks/checks/multi-language-autodetect.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: "Multi-language repository"
22
description: "An end-to-end integration test of a multi-language repository using automatic language detection"
33
operatingSystems: ["ubuntu", "macos"]
4+
env:
5+
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
46
steps:
57
- uses: ./../action/init
68
with:
@@ -11,7 +13,8 @@ steps:
1113
run: ./build.sh
1214
- uses: ./../action/analyze
1315
id: analysis
14-
- shell: bash
16+
- name: Check language autodetect for all languages excluding Ruby, Swift
17+
shell: bash
1518
run: |
1619
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
1720
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
@@ -43,3 +46,17 @@ steps:
4346
echo "Did not create a database for Python, or created it in the wrong location."
4447
exit 1
4548
fi
49+
- name: Check language autodetect for Ruby, Swift
50+
if: "(matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
51+
shell: bash
52+
run: |
53+
RUBY_DB=${{ fromJson(steps.analysis.outputs.db-locations).ruby }}
54+
if [[ ! -d $RUBY_DB ]] || [[ ! $RUBY_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
55+
echo "Did not create a database for Ruby, or created it in the wrong location."
56+
exit 1
57+
fi
58+
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
59+
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
60+
echo "Did not create a database for Swift, or created it in the wrong location."
61+
exit 1
62+
fi

Diff for: pr-checks/checks/ruby-autodetect.yml

-22
This file was deleted.

0 commit comments

Comments
 (0)