refactor: consolidate common/table into @repo/shared/components/table (#1516) #1726
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: Run checks | |
| on: [pull_request] | |
| jobs: | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.13.0" | |
| - name: Cache npm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build production bundle | |
| run: npm run build:local | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| - name: Run e2e tests | |
| run: npm run test:e2e | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 | |
| ga2-smoke-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.13.0" | |
| - name: Cache npm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm ci | |
| # Builds the GA2 site (build-local:ga2), covering GA2's build on every PR | |
| # alongside the BRC build in the e2e-tests job, then runs the GA2-only | |
| # smoke suite against it. Chromium only — this is a smoke check, not the | |
| # full cross-browser e2e run. | |
| - name: Build GA2 production bundle | |
| run: npm run build-local:ga2 | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run GA2 smoke tests | |
| run: npm run test:e2e:ga2 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report-ga2 | |
| path: playwright-report/ | |
| retention-days: 7 | |
| run-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.13.0" | |
| - name: Cache npm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run Prettier | |
| run: npm run check-format | |
| - name: Run Linter (ESLint) | |
| run: npm run lint | |
| - name: Type Check | |
| run: npx tsc --noEmit | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12.4" | |
| cache: "pip" | |
| cache-dependency-path: "./catalog/build/py/requirements.txt" | |
| - name: Install Python dependencies | |
| run: pip install -r ./catalog/build/py/requirements.txt | |
| - name: Check Python formatting | |
| run: npm run format:python -- --check | |
| - name: Run linkml-lint | |
| # Run linting on the LinkML schemas, to enforce conventions such as in naming, and to catch simple errors. | |
| run: npm run lint-schema | |
| - name: Test LinkML Python generation | |
| # Generate Python code from the main LinkML schemas, discarding the output; this will catch more subtle errors such as references to nonexistent elements. | |
| run: npm run test-gen-python | |
| - name: Validate BRC catalog files | |
| # Validate the catalog source files against their corresponding LinkML schemas. | |
| run: npm run validate-brc-catalog | |
| - name: Validate GA2 catalog files | |
| # Validate the GA2 catalog source files. | |
| run: npm run validate-ga2-catalog | |
| - name: poetry lint | |
| # Validate the GA2 catalog source files. | |
| run: poetry check -P catalog/py_package/ | |
| api-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Create backend .env file | |
| run: cp backend/api/.env.example backend/api/.env | |
| - name: Build catalog data | |
| run: | | |
| npm ci | |
| npm run build-brc-db | |
| - name: Start backend services | |
| run: | | |
| cd backend | |
| docker compose up -d --build | |
| docker compose logs | |
| - name: Wait for services to be healthy | |
| run: | | |
| timeout 60 bash -c 'until curl -s http://localhost:8080/api/v1/health | grep -q healthy; do sleep 2; done' | |
| - name: Run API smoke tests | |
| run: | | |
| cd backend/api | |
| uv run --extra dev pytest tests/ -v | |
| - name: Show logs on failure | |
| if: failure() | |
| run: | | |
| cd backend | |
| docker compose logs | |
| - name: Stop backend services | |
| if: always() | |
| run: | | |
| cd backend | |
| docker compose down -v |