From f980feff5a2d281c0380426d39b4b721af9a2be9 Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Fri, 30 Oct 2020 18:38:09 +0000 Subject: [PATCH] feat: adding a build github action --- .github/workflows/build.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..e5033dfa2 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,32 @@ +name: 'Build' + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache Node.js modules + uses: actions/cache@v2 + with: + # yarn cache files are stored in `~/.cache/yarn` on Linux/macOS + path: ~/.cache/yarn + key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + - name: Install dependencies + run: yarn --frozen-lockfile + - name: Run tests + run: yarn test