feat: add dataset support to update distribution settings #210
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Argilla package | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
- develop | |
- "feat/**" | |
- releases/** | |
pull_request: | |
paths: | |
- "argilla/**" | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- ready_for_review | |
release: | |
types: | |
- "published" | |
jobs: | |
run_unit_tests: | |
name: Run unit tests | |
uses: ./.github/workflows/argilla.run-python-tests.yml | |
with: | |
coverageReport: coverage | |
runsOn: extended-runner | |
pytestArgs: tests/unit | |
secrets: inherit | |
run_end2end_tests: | |
strategy: | |
matrix: | |
include: | |
- searchEngineDockerImage: docker.elastic.co/elasticsearch/elasticsearch:8.8.2 | |
searchEngineDockerEnv: '{"discovery.type": "single-node", "xpack.security.enabled": "false"}' | |
runsOn: extended-runner | |
name: Run end2end tests | |
uses: ./.github/workflows/argilla.end2end-examples.yml | |
with: | |
runsOn: ${{ matrix.runsOn }} | |
searchEngineDockerImage: ${{ matrix.searchEngineDockerImage }} | |
searchEngineDockerEnv: ${{ matrix.searchEngineDockerEnv }} | |
secrets: inherit | |
run_integration_tests: | |
name: Run integration tests | |
uses: ./.github/workflows/argilla.run-python-tests.yml | |
needs: | |
- run_unit_tests | |
with: | |
runsOn: extended-runner | |
coverageReport: coverage-extra | |
pytestArgs: tests/integration | |
secrets: inherit | |
push_coverage: | |
name: Upload code coverage | |
runs-on: ubuntu-latest | |
needs: | |
- run_unit_tests | |
- run_integration_tests | |
defaults: | |
run: | |
shell: bash -l {0} | |
working-directory: argilla | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v4 | |
- name: Download coverage reports | |
uses: actions/download-artifact@v3 | |
with: | |
path: argilla/coverage-report | |
- name: Copy all reports | |
run: find coverage-report/ -name "*.xml" -exec mv '{}' . \; | |
- name: Upload Coverage reports to Codecov 📦 | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: argilla | |
token: ${{ secrets.CODECOV_TOKEN }} | |
build_python_package: | |
name: Build Argilla python package | |
uses: ./.github/workflows/argilla.build-python-package.yml | |
needs: | |
- run_unit_tests | |
- run_integration_tests | |
secrets: inherit | |
# This job will upload a Python Package using Twine when a release is created | |
# For more information see: | |
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
publish_release: | |
name: Publish Release | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'release' }} | |
needs: | |
- run_integration_tests | |
defaults: | |
run: | |
shell: bash -l {0} | |
working-directory: argilla | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v4 | |
- name: Download python package | |
uses: actions/download-artifact@v4 | |
with: | |
name: argilla | |
path: dist | |
- name: Publish Package to TestPyPI 🥪 | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.AR_TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Test Installing 🍿 | |
run: pip install --index-url https://test.pypi.org/simple --no-deps argilla==${GITHUB_REF#refs/*/v} | |
- name: Publish Package to PyPI 🥩 | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.AR_PYPI_API_TOKEN }} |