Skip to content

Commit 53cfc95

Browse files
committed
Add PR check job for Ruby beta
Add a separate job that analyses the multilanguage test repo's Ruby code. For now, run this only with the latest released CodeQL build from defaults.json. The cached builds and nightly builds don't support Ruby yet. In future, we can update this and other PR checks to test a wider range of cases.
1 parent b22fb46 commit 53cfc95

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,47 @@ jobs:
497497
exit 1
498498
fi
499499
500+
# Ruby is in beta, so test it separately for now.
501+
multi-language-repo_test-ruby:
502+
needs: [check-js, check-node-modules, check-codeql-versions]
503+
strategy:
504+
fail-fast: false
505+
matrix:
506+
os: [ubuntu-latest, windows-latest, macos-latest]
507+
tools:
508+
- latest
509+
# TODO: Uncomment when nightly builds also support Ruby in beta.
510+
# - ${{ needs.check-codeql-versions.outputs.nightly-url }}
511+
runs-on: ${{ matrix.os }}
512+
env:
513+
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: true
514+
515+
steps:
516+
- uses: actions/checkout@v2
517+
- name: Move codeql-action
518+
shell: bash
519+
run: |
520+
mkdir ../action
521+
mv * .github ../action/
522+
mv ../action/tests/multi-language-repo/{*,.github} .
523+
mv ../action/.github/workflows .github
524+
- uses: ./../action/init
525+
with:
526+
languages: ruby
527+
tools: ${{ matrix.tools }}
528+
- uses: ./../action/analyze
529+
id: analysis
530+
env:
531+
TEST_MODE: true
532+
- name: Check database
533+
shell: bash
534+
run: |
535+
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
536+
if [[ ! -d "$RUBY_DB" ]]; then
537+
echo "Did not create a database for Ruby."
538+
exit 1
539+
fi
540+
500541
multi-language-repo_rubocop:
501542
needs: [check-js, check-node-modules]
502543
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)