Files
codeql-action/pr-checks/checks/ruby-autodetect.yml
Henry Mercer a190d3876a Rename TEST_MODE to specific variable for CodeQL Action
This allows us to set it automatically in the workflow generator,
simplifying things and reducing the scope for error.
2022-11-16 16:40:30 +00:00

23 lines
823 B
YAML

# This check should be combined into `multi-language-autodetect.yml` once Ruby is GA'ed
# and the `CODEQL_ENABLE_EXPERIMENTAL_FEATURES` environment variable is not needed.
name: "Ruby analysis using autodetect"
description: "Tests creation of a Ruby database when language isn't specified in init"
versions: ["latest", "cached", "nightly-latest"]
operatingSystems: ["ubuntu", "macos"]
env:
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: "true"
steps:
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
id: analysis
- name: Check database
shell: bash
run: |
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
if [[ ! -d "$RUBY_DB" ]]; then
echo "Did not create a database for Ruby."
exit 1
fi