ci: Publish on Github on tagging #73
Workflow file for this run
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 - Tests and Linting | |
| on: | |
| pull_request: | |
| branches: [main, develop] | |
| push: | |
| branches: [main, develop] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Run TypeScript type check - Backend | |
| run: npx tsc --noEmit | |
| working-directory: ./backend | |
| - name: Run TypeScript type check - Frontend | |
| run: npx tsc --noEmit | |
| working-directory: ./frontend | |
| - name: Run unit tests | |
| run: npm test -- --silent | |
| - name: Build backend | |
| run: npm run build:backend | |
| - name: Build frontend | |
| run: npm run build:frontend | |
| docker-build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image (test) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: false | |
| tags: pabawi:test | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |