From 760b399eb63a6b46e3007d8e4b5868797a1f158e Mon Sep 17 00:00:00 2001 From: Ricardo Arturo Cabral Mejia Date: Tue, 18 Oct 2022 13:04:59 +0000 Subject: [PATCH] feat: add checks workflow --- .github/workflows/checks.yml | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..9cfda27 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,60 @@ +name: Checks + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + push: + branches: [main] + +jobs: + lint: + name: Lint + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + - name: Install package dependencies + run: npm ci + - name: Run ESLint + run: npm run lint + build: + name: Build + needs: [lint] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + - name: Install package dependencies + run: npm ci + - name: Run ESLint + run: npm run build + test: + name: Tests + needs: [build] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + - name: Install package dependencies + run: npm ci + - name: Run tests + run: npm run test + coverage: + name: Coverage + needs: [build] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + - name: Install package dependencies + run: npm ci + - name: Run coverage + run: npm run cover