Skip to content

Commit

Permalink
Update blank.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0ught authored Sep 18, 2019
1 parent 9f37e9a commit 7121037
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
name: CI
workflow "test-and-deploy" {
on = "push"
resolves = "deploy"
}

on: [push]
action "install" {
uses = "docker://node:11.6.0"
args = "npm install"
}

jobs:
build:
action "test" {
uses = "docker://node:11.6.0"
args = "npm test"
needs = ["install"]
}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Run a one-line script
run: echo Hello, world!
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
test:
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [8]
os: [ubuntu-latest, windows-latest, macOS-latest]
action "lint" {
uses = "./.github/actions/jshint"
needs = ["install"]
}

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node-version }}
action "branch-filter" {
needs = ["test","lint"]
uses = "actions/bin/filter@master"
args = "branch master"
}

- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm test
action "deploy" {
needs = ["branch-filter"]
uses = "actions/bin/sh@master"
args = ["env"]
secrets = ["PHONY_SECRET"]
env = {
PHONY_ENV = "foo"
}
}

0 comments on commit 7121037

Please sign in to comment.