next-ui setup #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Client CI | |
on: | |
push: | |
paths: | |
- 'client/**.js' | |
- '.github/workflows/client.yml' | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install ESLint | |
run: | | |
cd client | |
npm install eslint eslint-plugin-react@latest | |
- name: Lint code | |
run: | | |
cd client | |
npx eslint --color -c .eslintrc.js src/ | |
Test: | |
runs-on: ubuntu-latest | |
needs: Lint | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
cd client | |
npm install | |
- name: Run tests | |
run: | | |
cd client | |
npm run test:ci | |
Build: | |
runs-on: ubuntu-latest | |
needs: Test | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
cd client | |
npm install | |
- name: Build react artifacts | |
run: | | |
cd client | |
npm run build |