From 0b19f08f3fda56df0c0b86760bbb2043fedc8e08 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Sun, 4 Apr 2021 04:36:01 -0700 Subject: [PATCH] Use GitHub Actions --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 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 0000000..86b4f20 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: test + +on: + push: + branches: + - "**" + tags-ignore: + - v* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - run: echo "::set-output name=version::$(cat .nvmrc)" + id: nvmrc + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: "${{ steps.nvmrc.outputs.version }}" + + - run: echo "::set-output name=dir::$(yarn cache dir)" + id: yarn-cache + + - name: Restore dependency cache + uses: actions/cache@v2 + with: + path: "${{ steps.yarn-cache.outputs.dir }}" + key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-cache- + + - name: Install dependencies + run: yarn --frozen-lockfile + + - name: Test + run: yarn test