updates for new version of act

This commit is contained in:
Unit Test 2020-02-12 00:22:14 -08:00
parent c3c8022de1
commit 84b1acafa0
No known key found for this signature in database
GPG Key ID: 1899120ECD0A1784
4 changed files with 26 additions and 3 deletions

4
.github/workflows/jshint/action.yml vendored Normal file
View File

@ -0,0 +1,4 @@
name: 'jshint'
runs:
using: 'docker'
image: 'Dockerfile'

19
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: test-and-deploy
on: push
jobs:
test:
runs-on: ubuntu-latest
container:
image: node:11.6.0
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm test
- uses: ./.github/workflows/jshint
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- run: env

View File

@ -2,12 +2,12 @@
Simple Node.js application to demonstrate the use of GitHub Actions Simple Node.js application to demonstrate the use of GitHub Actions
# Look Ma, no Makefile! # Look Ma, no Makefile!
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! 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!
Try these: Try these:
* `act -a lint` - run the linter * `act -j lint` - run the linter
* `act -a test` - run the tests * `act -j test` - run the tests
* `act` - run the the entire pipeline * `act` - run the the entire pipeline
* `act -l` - view the execution graph * `act -l` - view the execution graph