Skip to content

Commit

Permalink
ci: Review the argilla workflow (#4783)
Browse files Browse the repository at this point in the history
<!-- Thanks for your contribution! As part of our Community Growers
initiative 🌱, we're donating Justdiggit bunds in your name to reforest
sub-Saharan Africa. To claim your Community Growers certificate, please
contact David Berenstein in our Slack community or fill in this form
https://tally.so/r/n9XrxK once your PR has been merged. -->

# Description

This PR reviews and changes the `argilla.yml` workflow and makes
everything work.

- Some of the action versions have been upgraded.
- The check repo files workflow has been removed.
- The paths relative to `argilla` have been reviewed and updated.



**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [ ] New feature (non-breaking change which adds functionality)
- [ ] Refactor (change restructuring the codebase without changing
functionality)
- [x] Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**

(Please describe the tests that you ran to verify your changes. And
ideally, reference `tests`)

- [ ] Test A
- [ ] Test B

**Checklist**

- [ ] I added relevant documentation
- [ ] I followed the style guidelines of this project
- [ ] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [ ] I have added relevant notes to the `CHANGELOG.md` file (See
https://keepachangelog.com/)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
frascuchon and pre-commit-ci[bot] authored May 7, 2024

Verified

This commit was signed with the committer’s verified signature.
newhoggy John Ky
1 parent ad9dd8b commit f7eb639
Showing 12 changed files with 69 additions and 207 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/argilla.build-push-dev-frontend-docker.yml
Original file line number Diff line number Diff line change
@@ -53,10 +53,10 @@ jobs:
outputs:
version: ${{ steps.docker-image-tag-from-ref.outputs.docker-image-tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"

6 changes: 3 additions & 3 deletions .github/workflows/argilla.build-python-package.yml
Original file line number Diff line number Diff line change
@@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./argilla
working-directory: argilla

steps:
- name: Checkout Code 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache pip 👜
uses: actions/cache@v3
uses: actions/cache@v4
env:
# Increase this value to reset cache if pyproject.toml has not changed
CACHE_NUMBER: 0
58 changes: 0 additions & 58 deletions .github/workflows/argilla.check-repo-files.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/argilla.deploy-environment.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Authenticate in GCP using Workload Identity Federation
- name: Authenticate to Google Cloud
8 changes: 3 additions & 5 deletions .github/workflows/argilla.end2end-examples.yml
Original file line number Diff line number Diff line change
@@ -22,9 +22,6 @@ env:
CACHE_NUMBER: 1

jobs:
# Runs depending on the result from the check-repo-files.yml
call-check-repo-files:
uses: ./.github/workflows/argilla.check-repo-files.yml

end2end-examples:
name: end2end notebook examples, FeedbackDataset for text-classification
@@ -38,10 +35,11 @@ jobs:
defaults:
run:
shell: bash -l {0}
working-directory: argilla

steps:
- name: Checkout Code 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Conda Env 🐍
uses: conda-incubator/setup-miniconda@v2
@@ -61,7 +59,7 @@ jobs:
id: cache
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('argilla/environment_dev.yml') }}-${{ env.CACHE_NUMBER }}

- name: Update environment
if: steps.cache.outputs.cache-hit != 'true'
15 changes: 4 additions & 11 deletions .github/workflows/argilla.run-python-tests.yml
Original file line number Diff line number Diff line change
@@ -44,12 +44,14 @@ jobs:
defaults:
run:
shell: bash -l {0}
working-directory: argilla
env:
COVERAGE_REPORT: ${{ inputs.coverageReport }}
ARGILLA_ENABLE_TELEMETRY: 0

steps:
- name: Checkout Code 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Conda Env 🐍
uses: conda-incubator/setup-miniconda@v2
@@ -69,7 +71,7 @@ jobs:
id: cache
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('argilla/environment_dev.yml') }}-${{ env.CACHE_NUMBER }}

- name: Update environment
if: steps.cache.outputs.cache-hit != 'true'
@@ -100,9 +102,6 @@ jobs:
echo "Configure opensearch engine"
- name: Run tests 📈
working-directory: ./argilla
env:
ARGILLA_ENABLE_TELEMETRY: 0
run: |
pip install -e ".[server,listeners]"
pytest --cov=argilla --cov-report=xml:${{ env.COVERAGE_REPORT }}.xml ${{ inputs.pytestArgs }} -vs
@@ -114,17 +113,11 @@ jobs:
path: argilla/${{ env.COVERAGE_REPORT }}.xml

- name: Run tests with pandas v2 📈
working-directory: ./argilla
env:
ARGILLA_ENABLE_TELEMETRY: 0
run: |
pip install "pandas~=2.0" pytest-custom_exit_code
pytest --suppress-no-test-exit-code ${{ inputs.pytestArgs }} -vs
- name: Run tests with pydantic v2 📈
working-directory: ./argilla
env:
ARGILLA_ENABLE_TELEMETRY: 0
run: |
pip install "pydantic~=2.0" pytest-custom_exit_code
pytest --suppress-no-test-exit-code ${{ inputs.pytestArgs }} -vs
6 changes: 3 additions & 3 deletions .github/workflows/argilla.teardown-all-pr-environemnts.yml
Original file line number Diff line number Diff line change
@@ -15,16 +15,16 @@ jobs:
id-token: write

steps:
- uses: "actions/checkout@v3"
- uses: actions/checkout@v4

- name: Authenticate to Google Cloud
uses: "google-github-actions/auth@v1"
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WIP }}
service_account: ${{ secrets.GOOGLE_CLOUD_SERVICE_ACCOUNT }}

- name: Set up Cloud SDK
uses: "google-github-actions/setup-gcloud@v1"
uses: google-github-actions/setup-gcloud@v1
with:
version: ">= 435.0.0"

6 changes: 3 additions & 3 deletions .github/workflows/argilla.teardown-pr-environment.yml
Original file line number Diff line number Diff line change
@@ -16,16 +16,16 @@ jobs:
id-token: write

steps:
- uses: "actions/checkout@v3"
- uses: actions/checkout@v4

- name: Authenticate to Google Cloud
uses: "google-github-actions/auth@v1"
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WIP }}
service_account: ${{ secrets.GOOGLE_CLOUD_SERVICE_ACCOUNT }}

- name: Set up Cloud SDK
uses: "google-github-actions/setup-gcloud@v1"
uses: google-github-actions/setup-gcloud@v1
with:
version: ">= 435.0.0"

Loading

0 comments on commit f7eb639

Please sign in to comment.