diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6987a7..ab97626 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,71 +11,71 @@ permissions: contents: read jobs: - test-javascript: - name: JavaScript Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout - id: checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 - - - name: Setup Node.js - id: setup-node - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af - with: - node-version-file: .node-version - cache: npm - - - name: Install Dependencies - id: npm-ci - run: npm ci - - - name: Check Format - id: npm-format-check - run: npm run format:check - - - name: Lint - id: npm-lint - run: npm run lint - - - name: Test - id: npm-ci-test - run: npm run ci-test - - test-action-spawn-terminate: - name: GitHub Actions Test (spawn -> terminate) - runs-on: ubuntu-latest - strategy: - matrix: - provider: [ aws, hyperstack ] - fail-fast: false - steps: - - name: Checkout - id: checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 - - - name: Test start instance - id: test-start - uses: ./ - with: - mode: start - github-token: ${{ secrets.SLAB_ACTION_TOKEN }} - slab-url: ${{ secrets.SLAB_BASE_URL_PRE_PROD }} - job-secret: ${{ secrets.JOB_SECRET }} - backend: ${{ matrix.provider }} - profile: ci-test - - - name: Test stop instance - id: test-stop - if: ${{ always() }} - uses: ./ - with: - mode: stop - github-token: ${{ secrets.SLAB_ACTION_TOKEN }} - slab-url: ${{ secrets.SLAB_BASE_URL_PRE_PROD }} - job-secret: ${{ secrets.JOB_SECRET }} - label: ${{ steps.test-start.outputs.label }} +# test-javascript: +# name: JavaScript Tests +# runs-on: ubuntu-latest +# +# steps: +# - name: Checkout +# id: checkout +# uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 +# +# - name: Setup Node.js +# id: setup-node +# uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af +# with: +# node-version-file: .node-version +# cache: npm +# +# - name: Install Dependencies +# id: npm-ci +# run: npm ci +# +# - name: Check Format +# id: npm-format-check +# run: npm run format:check +# +# - name: Lint +# id: npm-lint +# run: npm run lint +# +# - name: Test +# id: npm-ci-test +# run: npm run ci-test +# +# test-action-spawn-terminate: +# name: GitHub Actions Test (spawn -> terminate) +# runs-on: ubuntu-latest +# strategy: +# matrix: +# provider: [ aws, hyperstack ] +# fail-fast: false +# steps: +# - name: Checkout +# id: checkout +# uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 +# +# - name: Test start instance +# id: test-start +# uses: ./ +# with: +# mode: start +# github-token: ${{ secrets.SLAB_ACTION_TOKEN }} +# slab-url: ${{ secrets.SLAB_BASE_URL_PRE_PROD }} +# job-secret: ${{ secrets.JOB_SECRET }} +# backend: ${{ matrix.provider }} +# profile: ci-test +# +# - name: Test stop instance +# id: test-stop +# if: ${{ always() }} +# uses: ./ +# with: +# mode: stop +# github-token: ${{ secrets.SLAB_ACTION_TOKEN }} +# slab-url: ${{ secrets.SLAB_BASE_URL_PRE_PROD }} +# job-secret: ${{ secrets.JOB_SECRET }} +# label: ${{ steps.test-start.outputs.label }} test-action-start-stop: name: GitHub Actions Test (start -> stop) diff --git a/dist/index.js b/dist/index.js index ea7be2e..6514211 100644 --- a/dist/index.js +++ b/dist/index.js @@ -49653,7 +49653,9 @@ async function getRunner(label) { repo: config.githubContext.repo } ) - const foundRunners = _.filter(runners, { labels: [{ name: label }] }) + core.info(`runners collected: ${runners}`) + const foundRunners = _.filter(runners, { name: label }) + core.info(`runners FOUND: ${foundRunners}`) return foundRunners.length > 0 ? foundRunners[0] : null } catch (error) { return null @@ -49666,6 +49668,8 @@ async function waitForRunnerRegistered(label) { const quietPeriodSeconds = 30 let waitSeconds = 0 + core.info(`RUNNER to wait: ${label}`) // DEBUG + core.info( `Waiting ${quietPeriodSeconds}s for ${config.input.backend} instance to be registered in GitHub as a new self-hosted runner` ) diff --git a/src/gh.js b/src/gh.js index 0f1455e..4e31394 100644 --- a/src/gh.js +++ b/src/gh.js @@ -17,7 +17,9 @@ async function getRunner(label) { repo: config.githubContext.repo } ) - const foundRunners = _.filter(runners, { labels: [{ name: label }] }) + core.info(`runners collected: ${runners}`) + const foundRunners = _.filter(runners, { name: label }) + core.info(`runners FOUND: ${foundRunners}`) return foundRunners.length > 0 ? foundRunners[0] : null } catch (error) { return null @@ -30,6 +32,8 @@ async function waitForRunnerRegistered(label) { const quietPeriodSeconds = 30 let waitSeconds = 0 + core.info(`RUNNER to wait: ${label}`) // DEBUG + core.info( `Waiting ${quietPeriodSeconds}s for ${config.input.backend} instance to be registered in GitHub as a new self-hosted runner` )