From ea281748ef88781c3d834bc701e218bbe090ed19 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 | 27 +++++++++++++++++++-------- .github/workflows/doctest.yml | 7 ++++++- .github/workflows/lint.yml | 7 ++++++- .github/workflows/run_notebooks.yml | 7 ++++++- .github/workflows/test.yml | 7 ++++++- 5 files changed, 43 insertions(+), 12 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index fb8970e35..4faf5b2f9 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -1,14 +1,25 @@ 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..c35cd6405 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -1,5 +1,10 @@ on: workflow_call: + inputs: + runner: + required: true + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +12,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/lint.yml b/.github/workflows/lint.yml index 5427c44dc..bf98db316 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,13 @@ on: workflow_call: + inputs: + runner: + required: true + 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..2f8b72747 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -1,5 +1,10 @@ on: workflow_call: + inputs: + runner: + required: true + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +12,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..679d097ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,10 @@ on: workflow_call: + inputs: + runner: + required: true + type: string + default: "['ubuntu-latest']" secrets: AA_TOKEN: required: true @@ -7,7 +12,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