diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 6e0b3ab..e27d05c 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -4,13 +4,22 @@ run-name: ${{ gitea.actor }} triggered CI pipeline on: workflow_dispatch: {} push: - branches: [main, develop, "fix-runner-trigger"] + branches: [main, develop] # only direct pushes/merges to protected branches pull_request: - branches: [main, develop] + branches: [main, develop] # PRs into main/develop + types: [opened, reopened, synchronize] jobs: + canary: + runs-on: ["self-hosted:host", "macos-latest:host"] + steps: + - run: | + uname -a + node -v || true + echo "Runner labels OK ✅" + test: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] strategy: matrix: { node-version: [18, 20] } env: @@ -39,7 +48,7 @@ jobs: # bash codecov.sh -t "${{ secrets.CODECOV_TOKEN }}" -f coverage/lcov.info -F unittests e2e: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] strategy: matrix: { browser: [chromium, firefox, webkit] } steps: @@ -72,7 +81,7 @@ jobs: retention-days: 30 visual-regression: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -109,45 +118,45 @@ jobs: retention-days: 30 performance: - runs-on: [self-hosted, macos-latest] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: { node-version: 20, cache: npm } - - run: npm ci - - - name: Install LHCI - run: npm i -D @lhci/cli - - # Ensure a Chrome binary is available (works on Linux/macOS runners) - - name: Install Chrome via Puppeteer (portable) - run: | - npx @puppeteer/browsers install chrome@stable -P .cache/puppeteer - echo "CHROME_PATH=$(npx @puppeteer/browsers executable-path chrome@stable -P .cache/puppeteer)" >> $GITHUB_ENV - - - name: Build application - run: npm run build - - - name: Start application - run: npm run preview & - env: { CI: true } - - - name: Wait for application - run: npx wait-on http://localhost:3000 - - - name: Run Lighthouse CI - run: npx lhci autorun --chrome-path="$CHROME_PATH" - env: { CI: true } - - - name: Upload LHCI results - if: always() - uses: actions/upload-artifact@v3 - with: - name: lhci-results - path: lhci-results + runs-on: ["self-hosted:host", "macos-latest:host"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: { node-version: 20, cache: npm } + - run: npm ci + + - name: Install LHCI + run: npm i -D @lhci/cli + + # Ensure a Chrome binary is available (works on Linux/macOS runners) + - name: Install Chrome via Puppeteer (portable) + run: | + npx @puppeteer/browsers install chrome@stable -P .cache/puppeteer + echo "CHROME_PATH=$(npx @puppeteer/browsers executable-path chrome@stable -P .cache/puppeteer)" >> $GITHUB_ENV + + - name: Build application + run: npm run build + + - name: Start application + run: npm run preview & + env: { CI: true } + + - name: Wait for application + run: npx wait-on http://localhost:3000 + + - name: Run Lighthouse CI + run: npx lhci autorun --chrome-path="$CHROME_PATH" + env: { CI: true } + + - name: Upload LHCI results + if: always() + uses: actions/upload-artifact@v3 + with: + name: lhci-results + path: lhci-results storybook: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -158,7 +167,7 @@ jobs: env: { CI: true } lint: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -168,7 +177,7 @@ jobs: - run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" build: - runs-on: [self-hosted, macos-latest] + runs-on: ["self-hosted:host", "macos-latest:host"] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.runner b/.runner index 87f9b4c..3cd2e93 100644 --- a/.runner +++ b/.runner @@ -1,12 +1,12 @@ { "WARNING": "This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.", - "id": 7, - "uuid": "3a8b9f5a-189b-47a3-b0b1-1a06c933cc06", - "name": "community-rule-runner-1", - "token": "23ecad1165282704291cfa5112a36aebfadfa40a", + "id": 12, + "uuid": "1f114e7b-9330-40fc-9c96-816b07f3e4c2", + "name": "community-rule-test-runner", + "token": "ba42513830cbc9e2eb6abf86ee119fadfcb7a14b", "address": "https://git.medlab.host", "labels": [ - "macos-latest:host", - "self-hosted:host" + "self-hosted:host", + "macos-latest:host" ] } diff --git a/.runner.pid b/.runner.pid index 5c1838f..dea2b2b 100644 --- a/.runner.pid +++ b/.runner.pid @@ -1 +1 @@ -39731 +35293 diff --git a/README.md b/README.md index f268d69..bcfd680 100644 --- a/README.md +++ b/README.md @@ -178,4 +178,9 @@ community-rule/ ## 📄 License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +<<<<<<< HEAD # Test from working commit +======= +# Test trigger +>>>>>>> bead0c737303fb7e83b3be0c5dbd121b00351b90 +# Test new runner diff --git a/config.yaml b/config.yaml index 23f70bb..f6ac342 100644 --- a/config.yaml +++ b/config.yaml @@ -9,8 +9,8 @@ runner: fetch_timeout: 5s fetch_interval: 2s labels: - - "macos-latest:host" - "self-hosted:host" + - "macos-latest:host" cache: enabled: true @@ -27,6 +27,7 @@ container: valid_volumes: [] docker_host: "" force_pull: false + mode: "host" host: workdir_parent: ""