✨ Add text search for fields #11838
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 package | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- "published" | |
push: | |
branches: | |
- "main" | |
- "develop" | |
- "releases/**" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- "main" | |
- "develop" | |
- "releases/**" | |
- "feature/**" | |
- "feat/**" | |
- "fix/**" | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
jobs: | |
check_repo_files: | |
name: Check source changes | |
if: ${{ !github.event.pull_request.draft }} | |
uses: ./.github/workflows/check-repo-files.yml | |
deployable_check: | |
name: Check if must build & deploy from environment | |
runs-on: ubuntu-latest | |
needs: check_repo_files | |
env: | |
IS_DEPLOYABLE: ${{ secrets.AR_DOCKER_USERNAME != '' && needs.check_repo_files.outputs.buildChanges == 'true' }} | |
outputs: | |
isDeployable: ${{ steps.set_output.outputs.is_deployable }} | |
steps: | |
- name: set output | |
id: set_output | |
run: | | |
echo "is_deployable=$IS_DEPLOYABLE" >> $GITHUB_OUTPUT | |
run_unit_tests: | |
name: Run unit tests | |
uses: ./.github/workflows/run-python-tests.yml | |
needs: check_repo_files | |
if: needs.check_repo_files.outputs.pythonChanges == 'true' | |
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"}' | |
coverageReport: coverage-elasticsearch-8.8.2 | |
runsOn: extended-runner | |
name: Run end2end tests | |
uses: ./.github/workflows/end2end-examples.yml | |
needs: check_repo_files | |
if: needs.check_repo_files.outputs.end2endChanges == 'true' | |
with: | |
runsOn: ${{ matrix.runsOn }} | |
searchEngineDockerImage: ${{ matrix.searchEngineDockerImage }} | |
searchEngineDockerEnv: ${{ matrix.searchEngineDockerEnv }} | |
secrets: inherit | |
run_integration_tests: | |
name: Run integration tests | |
uses: ./.github/workflows/run-python-tests.yml | |
needs: | |
- check_repo_files | |
- run_unit_tests | |
if: needs.check_repo_files.outputs.pythonChanges == 'true' | |
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 | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v3 | |
- name: Download coverage reports | |
uses: actions/download-artifact@v3 | |
- name: Copy all reports | |
run: find coverage-report*/ -name "*.xml" -exec mv '{}' . \; | |
- name: Display current files structure | |
run: ls -R | |
- name: Upload Coverage reports to Codecov 📦 | |
uses: codecov/codecov-action@v2 | |
run_frontend_test: | |
name: Run Argilla Frontend tests | |
runs-on: ubuntu-latest | |
needs: check_repo_files | |
if: needs.check_repo_files.outputs.frontendChanges == 'true' | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Run Frontend tests | |
working-directory: frontend | |
run: | | |
npm install | |
npm run lint | |
npm run test | |
build_python_package: | |
name: Build Argilla python package | |
uses: ./.github/workflows/build-python-package.yml | |
needs: | |
- run_unit_tests | |
- run_integration_tests | |
- check_repo_files | |
if: needs.check_repo_files.outputs.pythonChanges == 'true' | |
secrets: inherit | |
build_quickstart_for_develop_docker_image: | |
name: Build Quickstart For Develop docker image | |
uses: ./.github/workflows/build-push-dev-frontend-docker.yml | |
needs: deployable_check | |
if: needs.deployable_check.outputs.isDeployable == 'true' | |
with: | |
image-name: argilla/argilla-quickstart-for-dev | |
dockerfile: frontend/dev.frontend.Dockerfile | |
platforms: linux/amd64 | |
build-args: | | |
ARGILLA_SERVER_TAG=main | |
secrets: inherit | |
deploy_environment: | |
name: Deploy branch environment | |
uses: ./.github/workflows/deploy-environment.yml | |
needs: build_quickstart_for_develop_docker_image | |
if: | | |
!cancelled() && | |
github.event.pull_request.head.repo.full_name == github.repository && | |
needs.build_quickstart_for_develop_docker_image.result == 'success' && | |
needs.check_repo_files.outputs.frontendChanges == 'true' && | |
github.event_name == 'pull_request' && github.event.pull_request.draft == false | |
with: | |
image-name: argilla/argilla-quickstart-for-dev | |
image-version: ${{ needs.build_quickstart_for_develop_docker_image.outputs.version }} | |
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} | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v3 | |
- name: Download python package | |
uses: actions/download-artifact@v2 | |
with: | |
name: python-package | |
path: dist | |
- name: Publish Package to TestPyPI 🥪 | |
uses: pypa/gh-action-pypi-publish@master | |
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@master | |
with: | |
user: __token__ | |
password: ${{ secrets.AR_PYPI_API_TOKEN }} |