diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..7a75ef67 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,34 @@ +name: CI +on: [push] +jobs: + ci: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js 18.x + uses: actions/setup-node@v2 + with: + node-version: 18.x + + - name: Cache npm + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + + - name: Install packages + run: npm ci + + - name: Run lint + run: npm run lint + + - name: Run tests + run: npm run test:cov + env: + CI: "true" + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2