Chore: Update modules #65
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: ci | |
on: | |
pull_request: | |
branches: ['*'] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Copy repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install PNpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint code | |
run: pnpm run lint | |
- name: Build | |
run: pnpm run build | |
- name: Start Docker Compose services | |
run: docker compose up -d postgres mailhog | |
- run: ls -la | |
- name: Copy .env file | |
run: cp ./example.env ./.env | |
- name: Start App | |
run: pnpm run start & | |
- name: Wait for health check to pass | |
run: | | |
MAX_ATTEMPTS=50 | |
SLEEP_TIME=5 | |
COUNTER=0 | |
until curl --silent --show-error --fail http://localhost:3000/healthcheck > /dev/null | |
do | |
echo "Waiting for health check to pass..." | |
sleep $SLEEP_TIME | |
COUNTER=$((COUNTER + 1)) | |
if [[ $COUNTER -eq $MAX_ATTEMPTS ]]; then | |
echo "Max attempts reached. Exiting..." | |
exit 1 | |
fi | |
done | |
- name: Seed data | |
run: pnpm run console job seed | |
- name: Run Unit tests | |
run: pnpm run test | |
- name: Rin E2E tests | |
run: pnpm run test:e2e |