diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 00000000..ee582139 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,36 @@ +name: Unit Tests + +on: + pull_request: + branches: + - master + - develop + +jobs: + unit-tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: yarn-and-build-cache + with: + path: | + build + node_modules + key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node_modules-build- + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'yarn' + + - name: Lint & Test + run: | + yarn install + yarn lint + yarn test:unit