mirror of
https://github.com/github/codeql-action.git
synced 2025-12-29 02:30:11 +08:00
86 lines
2.1 KiB
YAML
86 lines
2.1 KiB
YAML
name: "Integration Testing"
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
multi-language-repo_test-autodetect-languages:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Move codeql-action
|
|
shell: bash
|
|
run: |
|
|
mkdir ../action
|
|
shopt -s dotglob
|
|
mv * ../action/
|
|
mv ../action/tests/multi-language-repo/* .
|
|
- uses: ./../action/init
|
|
- name: Build code
|
|
shell: bash
|
|
run: ./build.sh
|
|
- uses: ./../action/analyze
|
|
env:
|
|
TEST_MODE: true
|
|
|
|
multi-language-repo_test-custom-queries:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Move codeql-action
|
|
shell: bash
|
|
run: |
|
|
mkdir ../action
|
|
shopt -s dotglob
|
|
mv * ../action/
|
|
mv ../action/tests/multi-language-repo/* .
|
|
- uses: ./../action/init
|
|
with:
|
|
languages: cpp,csharp,go,java,javascript,python
|
|
config-file: ./.github/codeql/custom-queries.yml
|
|
- name: Build code
|
|
shell: bash
|
|
run: ./build.sh
|
|
- uses: ./../action/analyze
|
|
env:
|
|
TEST_MODE: true
|
|
|
|
|
|
multi-language-repo_rubocop:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Move codeql-action
|
|
shell: bash
|
|
run: |
|
|
mkdir ../action
|
|
shopt -s dotglob
|
|
mv * ../action/
|
|
mv ../action/tests/multi-language-repo/* .
|
|
- name: Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.6
|
|
- name: Install Code Scanning integration
|
|
run: bundle add code-scanning-rubocop --version 0.2.0 --skip-install
|
|
- name: Install dependencies
|
|
run: bundle install
|
|
- name: Rubocop run
|
|
run: |
|
|
bash -c "
|
|
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
|
|
[[ $? -ne 2 ]]
|
|
"
|
|
- uses: ./../action/upload-sarif
|
|
with:
|
|
sarif_file: rubocop.sarif
|
|
env:
|
|
TEST_MODE: true |