[Fix] Lint #21
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: Build & Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build Api & App | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install yarn | |
| uses: ./.github/actions/yarn-nm-install | |
| - name: Build | |
| run: | | |
| yarn nx build api | |
| yarn nx build app | |
| tests: | |
| name: '[Tests] Run unit, functional, integration tests' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install yarn | |
| uses: ./.github/actions/yarn-nm-install | |
| - name: Run all tests | |
| run: yarn nx run-many --target=test --all | |
| e2e-tests: | |
| name: '[E2e][Api] Run e2e tests' | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: bitnami/mysql:latest | |
| env: | |
| MYSQL_ROOT_USER: owl | |
| MYSQL_ROOT_PASSWORD: password | |
| ports: | |
| - 3307:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [22.x] | |
| db: [mysql] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install yarn | |
| uses: ./.github/actions/yarn-nm-install | |
| - name: Load env | |
| uses: ./.github/actions/load-env | |
| - name: Run e2e tests | |
| env: | |
| DB_TYPE: mysql | |
| DB_HOST: localhost | |
| DB_PORT: 3307 | |
| DB_USER: owl | |
| DB_PASS: password | |
| DB_TIMEZONE: Z | |
| DB_SYNCHRONIZE: true | |
| run: yarn nx run api-e2e:e2e --configuration=ci |