diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..8d7415b --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,28 @@ +# For more information see: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions + +name: Continuous Integration + +on: + pull_request: + branches: ['*'] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: yarn + - run: yarn prettier:check + - run: yarn test:coverage + - run: yarn build diff --git a/package.json b/package.json index 63eb243..e1b2f3f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "build:production": "cp ./env/.env.production .env && next build", "start": "next start", "test": "jest --watch", + "test:coverage": "jest --coverage", + "build": "next build", "lint:check": "next lint", "lint:fix": "next lint --fix", "build:staging": "cp ./env/.env.staging .env && next build",