Skip to content

Commit

Permalink
Replace Travis with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliangcs committed Nov 29, 2021
1 parent 70a85d6 commit 634d95f
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 42 deletions.
135 changes: 135 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on: push

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Lint
run: yarn lint

test-libs:
name: Test - core, schema, legacy-scripting-runner
runs-on: ubuntu-latest
environment: ci
env:
ZAPIER_DEPLOY_KEY: ${{ secrets.ZAPIER_DEPLOY_KEY }}
TEST_APP_ID: ${{ secrets.TEST_APP_ID }}

strategy:
matrix:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Test - core
run: yarn test
working-directory: packages/core
- name: Test - schema
run: yarn test
working-directory: packages/schema
- name: Test - legacy-scripting-runner
run: yarn test
working-directory: packages/legacy-scripting-runner

test-cli:
name: Test - cli
runs-on: ${{ matrix.os }}
environment: ci
env:
ZAPIER_DEPLOY_KEY: ${{ secrets.ZAPIER_DEPLOY_KEY }}
TEST_APP_ID: ${{ secrets.TEST_APP_ID }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Test - cli
run: yarn test
working-directory: packages/cli

smoke-test-libs:
name: Smoke test - core, schema
runs-on: ubuntu-latest
environment: ci
env:
ZAPIER_DEPLOY_KEY: ${{ secrets.ZAPIER_DEPLOY_KEY }}
TEST_APP_ID: ${{ secrets.TEST_APP_ID }}

strategy:
matrix:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Smoke test - core
run: yarn smoke-test
working-directory: packages/core
- name: Smoke test - schema
run: yarn smoke-test
working-directory: packages/schema

smoke-test-cli:
name: Smoke test - cli
runs-on: ${{ matrix.os }}

environment: ci
env:
ZAPIER_DEPLOY_KEY: ${{ secrets.ZAPIER_DEPLOY_KEY }}
TEST_APP_ID: ${{ secrets.TEST_APP_ID }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Smoke test - cli
run: yarn smoke-test
working-directory: packages/cli
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"devDependencies": {
"chalk": "^4.1.1",
"cross-env": "^7.0.3",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"postversion": "git push && git push --tags",
"lint": "eslint src snippets",
"lint:fix": "eslint --fix src snippets",
"test": "NODE_ENV=test mocha -t 50000 --recursive src/tests",
"smoke-test": "NODE_ENV=test mocha -t 120000 --recursive src/smoke-tests",
"test": "cross-env NODE_ENV=test mocha -t 50000 --recursive src/tests",
"smoke-test": "cross-env NODE_ENV=test mocha -t 120000 --recursive src/smoke-tests",
"validate-templates": "./scripts/validate-app-templates.js",
"set-template-versions": "./scripts/set-app-template-versions.js",
"validate": "yarn test && yarn smoke-test && yarn lint"
Expand Down
10 changes: 9 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3310,6 +3310,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand All @@ -3330,7 +3337,7 @@ cross-spawn@^7.0.0:
shebang-command "^2.0.0"
which "^2.0.1"

cross-spawn@^7.0.2, cross-spawn@^7.0.3:
cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down Expand Up @@ -7038,6 +7045,7 @@ minipass-fetch@^1.3.0, minipass-fetch@^1.3.2:
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.3.tgz#34c7cea038c817a8658461bf35174551dce17a0a"
integrity sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ==
dependencies:
encoding "^0.1.12"
minipass "^3.1.0"
minipass-sized "^1.0.3"
minizlib "^2.0.0"
Expand Down

0 comments on commit 634d95f

Please sign in to comment.