Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into v1 #354

Merged
merged 13 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/integration-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,27 @@ on:
pull_request:

jobs:
# This job and check-node-modules below dupliacte checks from `pr-checks.yml`.
# We run them here as well to gate the more expensive checks which wouldn't
# even be executing the correct code if these fail.
check-js:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Check generated JavaScript
run: .github/workflows/script/check-js.sh

check-node-modules:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Check node modules up to date
run: .github/workflows/script/check-node-modules.sh

multi-language-repo_test-autodetect-languages:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -40,6 +60,7 @@ jobs:
fi

multi-language-repo_test-custom-queries-and-remote-config:
needs: [check-js, check-node-modules]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -69,6 +90,7 @@ jobs:

# Currently is not possible to analyze Go in conjunction with other languages in macos
multi-language-repo_test-go-custom-queries:
needs: [check-js, check-node-modules]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -99,6 +121,7 @@ jobs:
TEST_MODE: true

go-custom-tracing:
needs: [check-js, check-node-modules]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -130,6 +153,7 @@ jobs:
TEST_MODE: true

go-custom-tracing-autobuild:
needs: [check-js, check-node-modules]
# No need to test Go autobuild on multiple OSes since
# we're testing Go custom tracing with a manual build on all OSes.
runs-on: ubuntu-latest
Expand All @@ -153,6 +177,7 @@ jobs:
TEST_MODE: true

multi-language-repo_rubocop:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -184,6 +209,7 @@ jobs:
TEST_MODE: true

test-proxy:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
Expand Down Expand Up @@ -211,6 +237,7 @@ jobs:
TEST_MODE: true

runner-analyze-javascript-ubuntu:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
Expand All @@ -237,6 +264,7 @@ jobs:
TEST_MODE: true

runner-analyze-javascript-windows:
needs: [check-js, check-node-modules]
runs-on: windows-latest

steps:
Expand All @@ -259,6 +287,7 @@ jobs:
TEST_MODE: true

runner-analyze-javascript-macos:
needs: [check-js, check-node-modules]
runs-on: macos-latest

steps:
Expand All @@ -281,6 +310,7 @@ jobs:
TEST_MODE: true

runner-analyze-csharp-ubuntu:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -315,6 +345,7 @@ jobs:
TEST_MODE: true

runner-analyze-csharp-windows:
needs: [check-js, check-node-modules]
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -350,6 +381,7 @@ jobs:
TEST_MODE: true

runner-analyze-csharp-macos:
needs: [check-js, check-node-modules]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -386,6 +418,7 @@ jobs:


runner-analyze-csharp-autobuild-ubuntu:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -419,6 +452,7 @@ jobs:
TEST_MODE: true

runner-analyze-csharp-autobuild-windows:
needs: [check-js, check-node-modules]
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -453,6 +487,7 @@ jobs:
TEST_MODE: true

runner-analyze-csharp-autobuild-macos:
needs: [check-js, check-node-modules]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -487,6 +522,7 @@ jobs:
TEST_MODE: true

runner-upload-sarif:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
Expand Down
41 changes: 3 additions & 38 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Check generated JavaScript
run: |
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Wipe the lib directory incase there are extra unnecessary files in there
rm -rf lib
# Generate the JavaScript files
npm run-script build
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"
run: .github/workflows/script/check-js.sh

check-node-modules:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Check node modules up to date
run: |
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Reinstall modules and then clean to remove absolute paths
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
npm ci
npm run removeNPMAbsolutePaths
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
git status
exit 1
fi
echo "Success: node_modules are up to date"
run: .github/workflows/script/check-node-modules.sh

npm-test:
needs: [check-js, check-node-modules]
strategy:
matrix:
os: [ubuntu-latest,macos-latest]
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/script/check-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -eu

# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Wipe the lib directory incase there are extra unnecessary files in there
rm -rf lib
# Generate the JavaScript files
npm run-script build
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"
21 changes: 21 additions & 0 deletions .github/workflows/script/check-node-modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -eu

# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Reinstall modules and then clean to remove absolute paths
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
npm ci
npm run removeNPMAbsolutePaths
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
git status
exit 1
fi
echo "Success: node_modules are up to date"
1 change: 1 addition & 0 deletions lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading