Adds GitHub topics filtering and display #12
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 | |
| on: | |
| push: | |
| branches: [main, next] | |
| pull_request: | |
| branches: [main, next] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| php: | |
| name: PHP — tests & style | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - name: Copy .env | |
| run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - name: Install Composer dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Run tests (Pest) | |
| run: php artisan test | |
| - name: Check code style (Pint) | |
| if: ${{ !cancelled() }} | |
| run: ./vendor/bin/pint --test | |
| frontend: | |
| name: Frontend — tests, lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # The root tsconfig.json extends .hybridly/tsconfig.json, which is generated | |
| # by `php artisan` during a build. This job runs PHP-free, so provide a | |
| # minimal stand-in the TypeScript transform can resolve. | |
| - name: Stub Hybridly tsconfig | |
| run: | | |
| mkdir -p .hybridly | |
| echo '{"compilerOptions":{"target":"esnext","module":"esnext","moduleResolution":"bundler","strict":true,"esModuleInterop":true,"skipLibCheck":true,"baseUrl":"..","paths":{"@/*":["./resources/*"]}}}' > .hybridly/tsconfig.json | |
| - name: Run tests (Vitest) | |
| run: pnpm test | |
| - name: Lint (ESLint) | |
| if: ${{ !cancelled() }} | |
| run: pnpm lint:check | |
| - name: Check formatting (Prettier) | |
| if: ${{ !cancelled() }} | |
| run: pnpm format:check |