Skip to content

Commit

Permalink
restore all default workflow triggers and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Fyson committed Sep 7, 2020
1 parent cc2dfaf commit 30bb37a
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "CodeScanning CLI"

on: [pull_request]
on: [push, pull_request]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "CodeQL action"

on: [pull_request]
on: [push, pull_request]

jobs:
build:
Expand Down
278 changes: 139 additions & 139 deletions .github/workflows/integration-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,153 +3,153 @@ name: "Integration Testing"
on: [push, pull_request]

jobs:
# multi-language-repo_test-autodetect-languages:
# runs-on: ubuntu-latest
multi-language-repo_test-autodetect-languages:
runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - name: Move codeql-action
# shell: bash
# run: |
# mkdir ../action
# mv * .github ../action/
# mv ../action/tests/multi-language-repo/{*,.github} .
# - uses: ./../action/init
# - name: Build code
# shell: bash
# run: ./build.sh
# - uses: ./../action/analyze
# env:
# TEST_MODE: true
# - run: |
# cd "$RUNNER_TEMP/codeql_databases"
# # List all directories as there will be precisely one directory per database
# # but there may be other files in this directory such as query suites.
# if [ "$(ls -d */ | wc -l)" != 6 ] || \
# [[ ! -d cpp ]] || \
# [[ ! -d csharp ]] || \
# [[ ! -d go ]] || \
# [[ ! -d java ]] || \
# [[ ! -d javascript ]] || \
# [[ ! -d python ]]; then
# echo "Did not find expected number of databases. Database dir contains: $(ls)"
# exit 1
# fi
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true
- run: |
cd "$RUNNER_TEMP/codeql_databases"
# List all directories as there will be precisely one directory per database
# but there may be other files in this directory such as query suites.
if [ "$(ls -d */ | wc -l)" != 6 ] || \
[[ ! -d cpp ]] || \
[[ ! -d csharp ]] || \
[[ ! -d go ]] || \
[[ ! -d java ]] || \
[[ ! -d javascript ]] || \
[[ ! -d python ]]; then
echo "Did not find expected number of databases. Database dir contains: $(ls)"
exit 1
fi
# multi-language-repo_test-custom-queries-and-remote-config:
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# runs-on: ${{ matrix.os }}
multi-language-repo_test-custom-queries-and-remote-config:
strategy:
fail-fast: false
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 * .github ../action/
# mv ../action/tests/multi-language-repo/{*,.github} .
# - uses: ./../action/init
# with:
# languages: cpp,csharp,java,javascript,python
# config-file: github/codeql-action/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }}
# - name: Build code
# shell: bash
# run: ./build.sh
# - uses: ./../action/analyze
# env:
# TEST_MODE: true
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
with:
languages: cpp,csharp,java,javascript,python
config-file: github/codeql-action/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true

# # Currently is not possible to analyze Go in conjunction with other languages in macos
# multi-language-repo_test-go-custom-queries:
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# runs-on: ${{ matrix.os }}
# Currently is not possible to analyze Go in conjunction with other languages in macos
multi-language-repo_test-go-custom-queries:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

# steps:
# - uses: actions/setup-go@v2
# if: ${{ matrix.os == 'macos-latest' }}
# with:
# go-version: '^1.13.1'
# - uses: actions/checkout@v2
# - name: Move codeql-action
# shell: bash
# run: |
# mkdir ../action
# mv * .github ../action/
# mv ../action/tests/multi-language-repo/{*,.github} .
# - uses: ./../action/init
# with:
# languages: go
# config-file: ./.github/codeql/custom-queries.yml
# - name: Build code
# shell: bash
# run: ./build.sh
# - uses: ./../action/analyze
# env:
# TEST_MODE: true
steps:
- uses: actions/setup-go@v2
if: ${{ matrix.os == 'macos-latest' }}
with:
go-version: '^1.13.1'
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
with:
languages: go
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
multi-language-repo_rubocop:
runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - name: Move codeql-action
# shell: bash
# run: |
# mkdir ../action
# mv * .github ../action/
# mv ../action/tests/multi-language-repo/{*,.github} .
# - 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.3.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
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- 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.3.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

# test-proxy:
# runs-on: ubuntu-latest
# container:
# image: ubuntu:18.04
# options: --dns 127.0.0.1
# services:
# squid-proxy:
# image: datadog/squid:latest
# ports:
# - 3128:3128
# env:
# https_proxy: http://squid-proxy:3128
# steps:
# - uses: actions/checkout@v2
# - name: Move codeql-action
# shell: bash
# run: |
# mkdir ../action
# mv * .github ../action/
# mv ../action/tests/multi-language-repo/{*,.github} .
# - uses: ./../action/init
# with:
# languages: javascript
# - uses: ./../action/analyze
# env:
# TEST_MODE: true
test-proxy:
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
options: --dns 127.0.0.1
services:
squid-proxy:
image: datadog/squid:latest
ports:
- 3128:3128
env:
https_proxy: http://squid-proxy:3128
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
with:
languages: javascript
- uses: ./../action/analyze
env:
TEST_MODE: true


# Test the behaviour when asked to scan a compiled language but no code is compiled
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "PR checks"

on: [pull_request]
on: [push, pull_request]

jobs:
tslint:
Expand Down

0 comments on commit 30bb37a

Please sign in to comment.