Run app using docker, CI workflow optimisations #5
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: Main workflow | |
on: | |
[push, pull_request] | |
jobs: | |
check-port: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.14.0' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Build the Next.js application | |
run: npm run build --if-present | |
- name: Code linting | |
run: npm run lint | |
- name: Run tests and collect coverage | |
run: npm run test | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |