From 9315730375fcf9a6ebd73913a65e435c80a395e6 Mon Sep 17 00:00:00 2001 From: cballevre Date: Wed, 11 Sep 2024 08:59:58 +0200 Subject: [PATCH] chore: Add CI with Github Actions --- .github/workflow/ci.yml | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflow/ci.yml diff --git a/.github/workflow/ci.yml b/.github/workflow/ci.yml new file mode 100644 index 0000000..90a4e35 --- /dev/null +++ b/.github/workflow/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + cache: 'yarn' + - name: Install dependencies + run: yarn install --frozen-lockfile + + lint: + needs: setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + cache: 'yarn' + - name: Lint + run: yarn lint + + test: + needs: setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + cache: 'yarn' + - name: Unit tests + run: yarn test + + build: + needs: [lint, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + cache: 'yarn' + - name: Build app + run: yarn build