Skip to content

Commit baa9c9e

Browse files
committed
Change integration tests
1 parent d966ea2 commit baa9c9e

2 files changed

Lines changed: 69 additions & 14 deletions

File tree

.github/workflows/integration-testing.yml

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,46 @@ name: "Integration Testing"
33
on: [push]
44

55
jobs:
6-
dispatch-events:
7-
if: github.event.repository.full_name == 'github/codeql-action'
8-
runs-on: ubuntu-latest
6+
multi-language-repo/test-autodetect-languages:
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, windows-latest, macos-latest]
10+
runs-on: ${{ matrix.os }}
11+
912
steps:
10-
- name: Send repository dispatch events
13+
- uses: actions/checkout@v2
14+
- name: Move codeql-action
15+
shell: bash
1116
run: |
12-
curl -X POST \
13-
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
14-
-H "Accept: application/vnd.github.everest-preview+json" \
15-
https://api.github.com/repos/Anthophila/amazon-cognito-js-copy/dispatches \
16-
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
17+
mkdir ../action
18+
mv * ../action/
19+
mv ../action/tests/multi-language-repo/* .
20+
- uses: ./../action/init
21+
- name: Build code
22+
shell: bash
23+
run: ./build.sh
24+
- uses: ./../action/analyze
25+
26+
27+
multi-language-repo/test-custom-queries:
28+
strategy:
29+
matrix:
30+
os: [ubuntu-latest, windows-latest, macos-latest]
31+
runs-on: ${{ matrix.os }}
1732

18-
curl -X POST \
19-
-H "Authorization: Bearer ${{ secrets.CODEQL_TESTING_TOKEN }}" \
20-
-H "Accept: application/vnd.github.everest-preview+json" \
21-
https://api.github.com/repos/Anthophila/electron-test-action/dispatches \
22-
-d '{"event_type":"codeql-integration","client_payload": {"sha": "${{ github.sha }}"}}'
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Move codeql-action
36+
shell: bash
37+
run: |
38+
mkdir ../action
39+
mv * ../action/
40+
mv ../action/tests/multi-language-repo/* .
41+
- uses: ./../action/init
42+
with:
43+
languages: cpp,csharp,go,java,javascript,python
44+
config-file: ./.github/codeql/custom-queries.yml
45+
- name: Build code
46+
shell: bash
47+
run: ./build.sh
48+
- uses: ./../action/analyze
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Use custom queries
2+
3+
disable-default-queries: true
4+
5+
queries:
6+
# Query suites
7+
- name: Select a query suite
8+
uses: ./codeql-qlpacks/complex-python-qlpack/rootAndBar.qls
9+
# QL pack subset
10+
- name: Select a ql file
11+
uses: ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
12+
- name: Select a subfolder
13+
uses: ./codeql-qlpacks/complex-javascript-qlpack/foo
14+
- name: Select a folder with two subfolders
15+
uses: ./codeql-qlpacks/complex-javascript-qlpack/foo2
16+
# Inrepo QL pack
17+
- name: Select an inrepo ql pack
18+
uses: ./codeql-qlpacks/csharp-qlpack
19+
- name: Java queries
20+
uses: ./codeql-qlpacks/java-qlpack
21+
# External QL packs
22+
- name: Go queries
23+
uses: Anthophila/go-querypack@master
24+
- name: Cpp queries
25+
uses: Anthophila/cpp-querypack@second-branch
26+
- name: Javascript queries
27+
uses: Anthophila/javascript-querypack/show_ifs2.ql@master
28+
- name: Python queries
29+
uses: Anthophila/python-querypack/show_ifs2.ql@second-branch

0 commit comments

Comments
 (0)