From ebe3cb13e0ff40557d87d35563724db9488e57aa Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Thu, 27 Feb 2020 17:36:45 -0500 Subject: [PATCH] Add some test workflows --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..526f8b8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +on: + push: {branches: master} + pull_request: {branches: master} + +jobs: + integration: + runs-on: ubuntu-latest + steps: + - name: output-set + uses: actions/github-script@master + with: + script: | + const core = require('@actions/core') + core.setOutput('result', 'test') + - run: | + if [[ "${{steps.output-set.outputs.result}}" != "test" ]]; then + exit 1 + fi + + jest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: {node-version: 13.x} + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} + restore-keys: ${{runner.os}}-npm- + - run: npm ci + - run: npm test