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