Skip to content

Commit

Permalink
build: use standard CI config (#710)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
JustinBeckwith and bcoe committed Nov 4, 2020
1 parent 9b1dd71 commit 9fd4bad
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .github/sync-repo-settings.yaml
Expand Up @@ -36,6 +36,7 @@ branchProtectionRules:
- "lint"
- "test (10)"
- "test (12)"
- "test (13)"
- "test (14)"
- "test (15)"
- "windows"
- "system-test"
36 changes: 10 additions & 26 deletions .github/workflows/ci.yaml
Expand Up @@ -3,21 +3,25 @@ on:
branches:
- master
pull_request:
schedule:
- cron: '0 2 * * *' # Run everyday, at 2AM UTC.
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 13, 14]
node: [10, 12, 14, 15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: node --version
# The first installation step ensures that all of our production
# dependencies work on the given Node.js version, this helps us find
# dependencies that don't match our engines field:
- run: npm install --production --engine-strict --ignore-scripts --no-package-lock
# Clean up the production install, before installing dev/production:
- run: rm -rf node_modules
- run: npm install
- run: npm test
- name: coverage
Expand All @@ -31,7 +35,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm test
- name: coverage
Expand All @@ -45,7 +49,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm run lint
docs:
Expand All @@ -54,26 +58,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm run docs-test
system-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run system-test
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions system-test
fail_ci_if_error: false
golint:
runs-on: ubuntu-latest
container: golang:latest
steps:
- run: gofmtdiff=$(gofmt -s -d .) && if [ -n "$gofmtdiff" ]; then printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1; fi
- run: go get -u golang.org/x/lint/golint && golintlint=$($GOPATH/bin/golint ./...) && if [ -n "$golintlint" ]; then printf 'golint found:\n%s\n' "$golintlint" && exit 1; fi
29 changes: 29 additions & 0 deletions .github/workflows/ci2.yaml
@@ -0,0 +1,29 @@
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 2 * * *' # Run everyday, at 2AM UTC.
name: ci-profiler
jobs:
system-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run system-test
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions system-test
fail_ci_if_error: false
golint:
runs-on: ubuntu-latest
container: golang:latest
steps:
- run: gofmtdiff=$(gofmt -s -d .) && if [ -n "$gofmtdiff" ]; then printf 'gofmt -s found:\n%s\n' "$gofmtdiff" && exit 1; fi
- run: go get -u golang.org/x/lint/golint && golintlint=$($GOPATH/bin/golint ./...) && if [ -n "$golintlint" ]; then printf 'golint found:\n%s\n' "$golintlint" && exit 1; fi
2 changes: 1 addition & 1 deletion synth.py
Expand Up @@ -8,6 +8,6 @@

common_templates = gcp.CommonTemplates()
templates = common_templates.node_library(source_location='build/src')
s.copy(templates, excludes=[".github/workflows/ci.yaml"])
s.copy(templates)
node.install()
node.fix()

0 comments on commit 9fd4bad

Please sign in to comment.