Add Homework Grader listing #173
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 Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| checks: write | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| name: Catalog Integration Tests | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: test-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| steps: | |
| # Checkout the boxel monorepo at root | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
| with: | |
| repository: cardstack/boxel | |
| # Checkout this catalog repo into a temp location | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
| with: | |
| path: boxel-catalog-src | |
| # Copy catalog files into the monorepo | |
| - name: Copy catalog files into monorepo | |
| run: | | |
| # Remove existing catalog-realm content (keep config files and folders required by test) | |
| cd packages/catalog-realm | |
| find . -mindepth 1 \ | |
| ! -name '.gitignore' \ | |
| ! -name 'tsconfig.json' \ | |
| ! -name 'package.json' \ | |
| ! -name '.realm.json' \ | |
| ! -path './Spec' \ | |
| ! -path './Spec/*' \ | |
| ! -path './fields' \ | |
| ! -path './fields/*' \ | |
| ! -path './components' \ | |
| ! -path './components/*' \ | |
| ! -path './commands' \ | |
| ! -path './commands/suggest-avatar.gts' \ | |
| ! -path './utils' \ | |
| ! -path './utils/*' \ | |
| ! -path './resources' \ | |
| ! -path './resources/*' \ | |
| ! -path './catalog-app' \ | |
| ! -path './catalog-app/*' \ | |
| ! -name '.' \ | |
| -exec rm -rf {} + 2>/dev/null || true | |
| cd ../.. | |
| # Copy catalog source files (exclude config files that should stay from monorepo) | |
| rsync -av --exclude='tsconfig.json' --exclude='package.json' --exclude='.realm.json' --exclude='.gitignore' --exclude='tests/' boxel-catalog-src/ packages/catalog-realm/ | |
| # Copy catalog acceptance and integration tests to host tests directory | |
| rm -rf packages/host/tests/integration | |
| rm -rf packages/host/tests/acceptance | |
| mkdir -p packages/host/tests/integration | |
| mkdir -p packages/host/tests/acceptance | |
| cp -r boxel-catalog-src/tests/acceptance/* packages/host/tests/acceptance | |
| cp -r boxel-catalog-src/tests/integration/* packages/host/tests/integration | |
| cp -r boxel-catalog-src/tests/helpers/* packages/host/tests/helpers | |
| # Overwrite the test-wait-for-server script to include catalog server start | |
| cp boxel-catalog-src/scripts/test-wait-for-servers.sh packages/host/scripts/test-wait-for-servers.sh | |
| - uses: ./.github/actions/init | |
| - name: Build common dependencies | |
| run: pnpm run build-common-deps | |
| - name: Build Host for tests | |
| run: NODE_OPTIONS='--max-old-space-size=8192' pnpm build | |
| working-directory: packages/host | |
| - name: Serve boxel-icons | |
| run: pnpm serve &> /tmp/icon-server.log & | |
| working-directory: packages/boxel-icons | |
| - name: Disable TCP/UDP network offloading | |
| run: sudo ethtool -K eth0 tx off rx off | |
| - name: Serve host dist for realm server | |
| uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7 | |
| with: | |
| run: pnpm serve:dist & | |
| working-directory: packages/host | |
| wait-for: 3m | |
| wait-on: http-get://localhost:4200 | |
| - name: Start realm servers | |
| run: pnpm start:services-for-host-tests | tee -a /tmp/server.log & | |
| working-directory: packages/realm-server | |
| - name: Create realm users | |
| run: pnpm register-realm-users | |
| working-directory: packages/matrix | |
| - name: Install D-Bus helpers | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dbus-x11 upower | |
| sudo service dbus restart | |
| sudo service upower restart | |
| - name: Run Catalog Acceptance Tests | |
| run: dbus-run-session -- pnpm exec ember exam --path ./dist --filter="Acceptance" | |
| env: | |
| PERCY_GZIP: true | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_HOST }} | |
| DBUS_SYSTEM_BUS_ADDRESS: unix:path=/run/dbus/system_bus_socket | |
| working-directory: packages/host | |
| - name: Run Catalog Integration Tests | |
| run: dbus-run-session -- pnpm exec ember exam --path ./dist --filter="Integration" | |
| env: | |
| PERCY_GZIP: true | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_HOST }} | |
| DBUS_SYSTEM_BUS_ADDRESS: unix:path=/run/dbus/system_bus_socket | |
| working-directory: packages/host | |
| - name: Print realm server logs | |
| if: always() | |
| run: cat /tmp/server.log |