Change integration tests
This commit is contained in:
parent
d966ea2f52
commit
baa9c9e0df
2 changed files with 71 additions and 16 deletions
58
.github/workflows/integration-testing.yml
vendored
58
.github/workflows/integration-testing.yml
vendored
|
|
@ -3,20 +3,46 @@ name: "Integration Testing"
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dispatch-events:
|
multi-language-repo/test-autodetect-languages:
|
||||||
if: github.event.repository.full_name == 'github/codeql-action'
|
strategy:
|
||||||
runs-on: ubuntu-latest
|
matrix:
|
||||||
steps:
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
- name: Send repository dispatch events
|
runs-on: ${{ matrix.os }}
|
||||||
run: |
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
|
|
||||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
|
||||||
https://api.github.com/repos/Anthophila/amazon-cognito-js-copy/dispatches \
|
|
||||||
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
|
|
||||||
|
|
||||||
curl -X POST \
|
steps:
|
||||||
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
|
- uses: actions/checkout@v2
|
||||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
- name: Move codeql-action
|
||||||
https://api.github.com/repos/Anthophila/electron-test-action/dispatches \
|
shell: bash
|
||||||
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
|
run: |
|
||||||
|
mkdir ../action
|
||||||
|
mv * ../action/
|
||||||
|
mv ../action/tests/multi-language-repo/* .
|
||||||
|
- uses: ./../action/init
|
||||||
|
- name: Build code
|
||||||
|
shell: bash
|
||||||
|
run: ./build.sh
|
||||||
|
- uses: ./../action/analyze
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
29
tests/multi-language-repo/.github/codeql/custom-queries.yml
vendored
Normal file
29
tests/multi-language-repo/.github/codeql/custom-queries.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Use custom queries
|
||||||
|
|
||||||
|
disable-default-queries: true
|
||||||
|
|
||||||
|
queries:
|
||||||
|
# Query suites
|
||||||
|
- name: Select a query suite
|
||||||
|
uses: ./codeql-qlpacks/complex-python-qlpack/rootAndBar.qls
|
||||||
|
# QL pack subset
|
||||||
|
- name: Select a ql file
|
||||||
|
uses: ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
|
||||||
|
- name: Select a subfolder
|
||||||
|
uses: ./codeql-qlpacks/complex-javascript-qlpack/foo
|
||||||
|
- name: Select a folder with two subfolders
|
||||||
|
uses: ./codeql-qlpacks/complex-javascript-qlpack/foo2
|
||||||
|
# Inrepo QL pack
|
||||||
|
- name: Select an inrepo ql pack
|
||||||
|
uses: ./codeql-qlpacks/csharp-qlpack
|
||||||
|
- name: Java queries
|
||||||
|
uses: ./codeql-qlpacks/java-qlpack
|
||||||
|
# External QL packs
|
||||||
|
- name: Go queries
|
||||||
|
uses: Anthophila/go-querypack@master
|
||||||
|
- name: Cpp queries
|
||||||
|
uses: Anthophila/cpp-querypack@second-branch
|
||||||
|
- name: Javascript queries
|
||||||
|
uses: Anthophila/javascript-querypack/show_ifs2.ql@master
|
||||||
|
- name: Python queries
|
||||||
|
uses: Anthophila/python-querypack/show_ifs2.ql@second-branch
|
||||||
Loading…
Add table
Add a link
Reference in a new issue