Skip to content

Commit

Permalink
Add Ruby and Swift language autodetect tests (#1369)
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Mercer <henry.mercer@me.com>
  • Loading branch information
angelapwen and henrymercer committed Nov 22, 2022
1 parent 26df9a9 commit bab5a14
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 90 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/__multi-language-autodetect.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 0 additions & 66 deletions .github/workflows/__ruby-autodetect.yml

This file was deleted.

19 changes: 18 additions & 1 deletion pr-checks/checks/multi-language-autodetect.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Multi-language repository"
description: "An end-to-end integration test of a multi-language repository using automatic language detection"
operatingSystems: ["ubuntu", "macos"]
env:
CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" # Remove when Swift is GA.
steps:
- uses: ./../action/init
with:
Expand All @@ -11,7 +13,8 @@ steps:
run: ./build.sh
- uses: ./../action/analyze
id: analysis
- shell: bash
- name: Check language autodetect for all languages excluding Ruby, Swift
shell: bash
run: |
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
Expand Down Expand Up @@ -43,3 +46,17 @@ steps:
echo "Did not create a database for Python, or created it in the wrong location."
exit 1
fi
- name: Check language autodetect for Ruby, Swift
if: "(matrix.version == 'cached' || matrix.version == 'latest' || matrix.version == 'nightly-latest')"
shell: bash
run: |
RUBY_DB=${{ fromJson(steps.analysis.outputs.db-locations).ruby }}
if [[ ! -d $RUBY_DB ]] || [[ ! $RUBY_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Ruby, or created it in the wrong location."
exit 1
fi
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Swift, or created it in the wrong location."
exit 1
fi
22 changes: 0 additions & 22 deletions pr-checks/checks/ruby-autodetect.yml

This file was deleted.

0 comments on commit bab5a14

Please sign in to comment.