feat: add timeout configuration and improve SMTP authentication error handling #61
This file contains hidden or 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 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| jobs: | |
| build-test: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| # Required to checkout the code | |
| contents: read | |
| # Required to put a comment into the pull-request | |
| pull-requests: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: corepack enable | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: 📦 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 👀 Lint | |
| run: pnpm lint | |
| - name: 👀 Typecheck | |
| run: pnpm type-check | |
| - name: 🚀 Build | |
| run: pnpm build | |
| - name: 🐳 Setup MailCrab | |
| run: | | |
| docker pull marlonb/mailcrab | |
| docker run -d --name unemail-mailcrab -p 1025:1025 -p 1080:1080 marlonb/mailcrab | |
| - name: 🧪 Test with coverage | |
| run: pnpm test:coverage | |
| env: | |
| MAILCRAB_HOST: localhost | |
| MAILCRAB_SMTP_PORT: 1025 | |
| MAILCRAB_UI_PORT: 1080 | |
| - name: 📝 Upload coverage | |
| if: always() | |
| uses: davelosert/vitest-coverage-report-action@v2 |