From cb6eb7c940ab26c54330bb127dc6a3edbf1309f0 Mon Sep 17 00:00:00 2001 From: Ivan Rudoy Date: Sat, 25 Apr 2020 03:00:34 +1000 Subject: [PATCH] ci: run tests on push, upload coverage report to codecov --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..c20d5c4b8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: test + +on: [push] + +jobs: + run: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@01aecccf739ca6ff86c0539fbc67a7a5007bbc81 + - name: Setup Node + uses: actions/setup-node@44c9c187283081e4e88b54b0efad9e9d468165a4 + with: + node-version: '12.x' + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Cache dependencies + uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install + - run: yarn test --bail --ci + - name: Upload coverage to Codecov + uses: codecov/codecov-action@e34ee485244a5b5e6e4e1b96daa4a15c9073e4fc