Skip to content

fix: Remove type creation for postgresql #6421

fix: Remove type creation for postgresql

fix: Remove type creation for postgresql #6421

Workflow file for this run

name: Build package
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
release:
types:
- "published"
push:
branches:
- "main"
- "develop"
- "integration"
- "releases/**"
- "feature/**"
- "feat/**"
pull_request:
branches:
- "main"
- "develop"
- "releases/**"
- "feature/**"
- "feat/**"
jobs:
check_repo_files:
name: Check source changes
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_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
- searchEngineDockerImage: docker.elastic.co/elasticsearch/elasticsearch:8.0.1
searchEngineDockerEnv: '{"discovery.type": "single-node", "xpack.security.enabled": "false"}'
coverageReport: coverage-elasticsearch-8.0.1
- searchEngineDockerImage: docker.elastic.co/elasticsearch/elasticsearch:7.17.11
searchEngineDockerEnv: '{"discovery.type": "single-node", "xpack.security.enabled": "false"}'
coverageReport: coverage-elasticsearch-7.17.11
- searchEngineDockerImage: opensearchproject/opensearch:2.4.1
searchEngineDockerEnv: '{"discovery.type": "single-node", "plugins.security.disabled": "true"}'
coverageReport: coverage-opensearch-2.4.1
- searchEngineDockerImage: opensearchproject/opensearch:1.3.11
searchEngineDockerEnv: '{"discovery.type": "single-node", "plugins.security.disabled": "true"}'
coverageReport: coverage-opensearch-1.3.11
name: Run base tests
uses: ./.github/workflows/run-python-tests.yml
needs: check_repo_files
if: needs.check_repo_files.outputs.pythonChanges == 'true'
with:
searchEngineDockerImage: ${{ matrix.searchEngineDockerImage }}
searchEngineDockerEnv: ${{ matrix.searchEngineDockerEnv }}
coverageReport: coverage
pytestArgs: |
--ignore=tests/training \
--ignore=tests/client/feedback/training \
--ignore=tests/monitoring \
--ignore=tests/listeners
secrets: inherit
run_tests_extra:
name: Run extra tests (training, monitoring and listeners)
uses: ./.github/workflows/run-python-tests.yml
needs: check_repo_files
if: needs.check_repo_files.outputs.pythonChanges == 'true'
# continue-on-error: true
with:
coverageReport: coverage-extra
pytestArgs: |
tests/training \
tests/client/feedback/training \
tests/monitoring \
tests/listeners
secrets: inherit
push_coverage:
name: Upload code coverage
runs-on: ubuntu-latest
needs:
- run_tests
- run_tests_extra
steps:
- name: Checkout Code 🛎
uses: actions/checkout@v2
- 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
build_python_package:
name: Build Argilla python package
uses: ./.github/workflows/build-python-package.yml
needs: deployable_check
if: needs.deployable_check.outputs.isDeployable == 'true'
secrets: inherit
build_server_docker_image:
name: Build Argilla server docker image
uses: ./.github/workflows/build-push-docker.yml
needs:
- build_python_package
- run_tests
- run_tests_extra
- deployable_check
if: |
always() &&
needs.deployable_check.outputs.isDeployable == 'true' &&
needs.run_tests.result != 'failure' &&
needs.run_tests_extra.result != 'failure'
with:
download-python-package: true
image-name: argilla/argilla-server
dockerfile: docker/Dockerfile
readme: README.md
platforms: linux/amd64,linux/arm64
secrets: inherit
build_quickstart_docker_image:
name: Build Argilla quickstart docker image
uses: ./.github/workflows/build-push-docker.yml
needs: build_server_docker_image
if: |
always() &&
needs.build_server_docker_image.result == 'success'
with:
download-python-package: false
image-name: argilla/argilla-quickstart
dockerfile: docker/quickstart.Dockerfile
readme: docker/quickstart.README.md
platforms: linux/amd64,linux/arm64
build-args: |
ARGILLA_VERSION=${{ needs.build_server_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
deploy_release:
name: Deploy Release
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
needs:
- build_quickstart_docker_image
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Code 🛎
uses: actions/checkout@v2
- 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 }}