Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 84b1aca

Browse files
author
Unit Test
committed
updates for new version of act
1 parent c3c8022 commit 84b1aca

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

.github/workflows/jshint/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: 'jshint'
2+
runs:
3+
using: 'docker'
4+
image: 'Dockerfile'

.github/workflows/main.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: test-and-deploy
2+
on: push
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
container:
8+
image: node:11.6.0
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: npm install
12+
- run: npm test
13+
- uses: ./.github/workflows/jshint
14+
15+
deploy:
16+
runs-on: ubuntu-latest
17+
needs: test
18+
steps:
19+
- run: env

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Simple Node.js application to demonstrate the use of GitHub Actions
33

44
# Look Ma, no Makefile!
5-
All the tasks necessary for testing, building and deploying this code is already defined in `.github/main.workflow` so why would you want to also create a `Makefile` for local development? Now you can use [act](https://github.com/nektos/act) to run the actions locally!
5+
All the tasks necessary for testing, building and deploying this code is already defined in `.github/workflows/` so why would you want to also create a `Makefile` for local development? Now you can use [act](https://github.com/nektos/act) to run the actions locally!
66

77
Try these:
88

9-
* `act -a lint` - run the linter
10-
* `act -a test` - run the tests
9+
* `act -j lint` - run the linter
10+
* `act -j test` - run the tests
1111
* `act` - run the the entire pipeline
1212
* `act -l` - view the execution graph
1313

0 commit comments

Comments
 (0)