From dbca89a2d3bc9e96417f747c28bdf1e27fee14f1 Mon Sep 17 00:00:00 2001 From: Niklas Koehnecke Date: Wed, 10 Apr 2024 17:47:18 +0200 Subject: [PATCH] minor refactor, create custom stages of different OS testing --- .github/workflows/daily.yml | 75 ++++++++++++++++++++++++++++++--- .github/workflows/on-push.yml | 2 +- .github/workflows/sdk-tests.yml | 2 +- 3 files changed, 70 insertions(+), 9 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 92c26da6b..89dc430a6 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -1,7 +1,7 @@ -name: CI +name: "os-support-tests" on: - #temporary + # TODO temporary push: paths-ignore: - "trace-viewer/**" @@ -10,13 +10,74 @@ on: # 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 + +defaults: + run: + shell: bash jobs: - os-support: - uses: ./.github/workflows/sdk-tests.yml + test: strategy: matrix: os: [macos-latest, windows-latest] - with: - runner: ${{ matrix.os }} - secrets: inherit + runs-on: ${{matrix.os}} + # difference to regular test: no docker, no venv caching + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + - name: Install dependencies + run: | + poetry config installer.max-workers 10 + poetry install --no-interaction + + - name: Run pytest + env: + AA_TOKEN: ${{ secrets.AA_TOKEN }} + HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} + ARGILLA_API_URL: "http://localhost:6900/" + ARGILLA_API_KEY: "argilla.apikey" + CLIENT_URL: "https://api.aleph-alpha.com" + run: | + poetry run python3 -c "import nltk; nltk.download('punkt')" + poetry run pytest -n 10 -m "not docker" + run-notebooks: + strategy: + matrix: + os: [macos-latest, windows-latest] + runs-on: ${{matrix.os}} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + - name: Install dependencies + run: | + poetry config installer.max-workers 10 + poetry install --no-interaction + - name: Configure Poetry for notebooks and run + env: + AA_TOKEN: ${{ secrets.AA_TOKEN }} + HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} + ARGILLA_API_URL: "http://localhost:6900/" + ARGILLA_API_KEY: "argilla.apikey" + CLIENT_URL: "https://api.aleph-alpha.com" + run: | + ./scripts/notebook_runner.sh diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index c50f6bcfd..742b62f1e 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -1,4 +1,4 @@ -name: CI Pipeline +name: Intelligence Layer SDK Tests on: push: diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 9887432b5..11c3d08cf 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -113,13 +113,13 @@ jobs: env: ARGILLA_ELASTICSEARCH: "http://argilla-elastic-search:9200" open-telemetry-trace-service: + image: jaegertracing/all-in-one:1.35 env: COLLECTOR_OTLP_ENABLED: "true" ports: - "4317:4317" - "4318:4318" - "16686:16686" - image: jaegertracing/all-in-one:1.35 steps: - name: Checkout repository uses: actions/checkout@v4