-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a99bb3
commit d123f10
Showing
568 changed files
with
15,974 additions
and
93,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,81 @@ | ||
name: Main workflow | ||
on: [push] | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- releases/* | ||
|
||
jobs: | ||
run: | ||
name: Run | ||
build: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set Node.js 10.x | ||
uses: actions/setup-node@master | ||
with: | ||
version: 10.x | ||
- uses: actions/checkout@v2 | ||
- name: Setup node 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run format-check | ||
- run: npm run pack | ||
- run: npm test | ||
- name: Verify no unstaged changes | ||
if: runner.os != 'windows' | ||
run: __tests__/verify-no-unstaged-changes.sh | ||
|
||
- name: npm install | ||
run: npm install | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Clear tool cache | ||
run: rm -rf $RUNNER_TOOL_CACHE/* | ||
- name: Setup node 10 | ||
uses: ./ | ||
with: | ||
node-version: 10.x | ||
- name: Verify node and npm | ||
run: __tests__/verify-node.sh 10 | ||
|
||
- name: Lint | ||
run: npm run format-check | ||
test-proxy: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:latest | ||
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: Clear tool cache | ||
run: rm -rf $RUNNER_TOOL_CACHE/* | ||
- name: Setup node 10 | ||
uses: ./ | ||
with: | ||
node-version: 10.x | ||
- name: Verify node and npm | ||
run: __tests__/verify-node.sh 10 | ||
|
||
- name: npm test | ||
run: npm test | ||
test-bypass-proxy: | ||
runs-on: ubuntu-latest | ||
env: | ||
https_proxy: http://no-such-proxy:3128 | ||
no_proxy: github.com,nodejs.org,registry.npmjs.org | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Clear tool cache | ||
run: rm -rf $RUNNER_TOOL_CACHE/* | ||
- name: Setup node 10 | ||
uses: ./ | ||
with: | ||
node-version: 10.x | ||
- name: Verify node and npm | ||
run: __tests__/verify-node.sh 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$(git status --porcelain)" != "" ]]; then | ||
echo ---------------------------------------- | ||
echo git status | ||
echo ---------------------------------------- | ||
git status | ||
echo ---------------------------------------- | ||
echo git diff | ||
echo ---------------------------------------- | ||
git diff | ||
echo ---------------------------------------- | ||
echo Troubleshooting | ||
echo ---------------------------------------- | ||
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run all" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$1" ]; then | ||
echo "Must supply node version argument" | ||
exit 1 | ||
fi | ||
|
||
node_version="$(node --version)" | ||
echo "Found node version '$node_version'" | ||
if [ -z "$(echo $node_version | grep v$1)" ]; then | ||
echo "Unexpected version" | ||
exit 1 | ||
fi | ||
|
||
echo "Testing npm install" | ||
mkdir -p test-npm-install | ||
cd test-npm-install | ||
npm init -y || exit 1 | ||
npm install @actions/core || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.