From 0623ffde0da1f17ddb030094617372c374c8acce Mon Sep 17 00:00:00 2001 From: Niklas Koehnecke Date: Tue, 9 Apr 2024 11:52:32 +0200 Subject: [PATCH] Add runner as an option to all workflows --- .github/workflows/daily.yml | 26 +++++++++++++++++-------- .github/workflows/doctest.yml | 6 +++++- .github/workflows/github-actions.yml | 29 ++++++++++++++++------------ .github/workflows/lint.yml | 6 +++++- .github/workflows/run_notebooks.yml | 6 +++++- .github/workflows/test.yml | 6 +++++- 6 files changed, 55 insertions(+), 24 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index fb8970e35..74e63bbde 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -1,14 +1,24 @@ name: CI -# Scheduled workflows will only run on the default branch. on: - schedule: + workflow_dispatch: +# Scheduled workflows will only run on the default branch. + schedule: - cron: '0 0 * * *' # runs once a day at midnight in the timezone of your GitHub repository jobs: - build: - runs-on: [windows-latest, macos-latest] - steps: - - name: Checkout code - uses: actions/checkout@v2 - # your steps go here + + # doctest: + # uses: ./.github/workflows/doctest.yml + # secrets: inherit + lint: + uses: ./.github/workflows/lint.yml + with: + runner: "['windows-latest', 'macos-latest']" + secrets: inherit + # test: + # uses: ./.github/workflows/test.yml + # secrets: inherit + # run-notebooks: + # uses: ./.github/workflows/run_notebooks.yml + # secrets: inherit diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml index 13e1a6b8d..ba6ec2ab6 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -1,5 +1,9 @@ on: workflow_call: + inputs: + runner: + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +11,7 @@ on: required: true jobs: doctest: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(inputs.runner) }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index d7aadfc19..61f2ba52e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -10,15 +10,20 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - doctest: - uses: ./.github/workflows/doctest.yml - secrets: inherit - lint: - uses: ./.github/workflows/lint.yml - secrets: inherit - test: - uses: ./.github/workflows/test.yml - secrets: inherit - run-notebooks: - uses: ./.github/workflows/run_notebooks.yml - secrets: inherit + # doctest: + # uses: ./.github/workflows/doctest.yml + # secrets: inherit + # lint: + # uses: ./.github/workflows/lint.yml + # secrets: inherit + # test: + # uses: ./.github/workflows/test.yml + # secrets: inherit + # run-notebooks: + # uses: ./.github/workflows/run_notebooks.yml + # secrets: inherit + macOs: + uses: ./.github/workflows/lint.yml + with: + runner: "['windows-latest', 'macos-latest']" + secrets: inherit diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5427c44dc..78c426ffb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,12 @@ on: workflow_call: + inputs: + runner: + type: string + default: "['ubuntu-latest']" jobs: lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(inputs.runner) }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml index 70eb381dd..f9d880c35 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -1,5 +1,9 @@ on: workflow_call: + inputs: + runner: + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +11,7 @@ on: required: true jobs: run-notebooks: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(inputs.runner) }} services: argilla-elastic-search: image: docker.elastic.co/elasticsearch/elasticsearch:8.5.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36ab4da63..a7524364d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,9 @@ on: workflow_call: + inputs: + runner: + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +11,7 @@ on: required: true jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(inputs.runner) }} services: argilla-elastic-search: image: docker.elastic.co/elasticsearch/elasticsearch:8.5.3