Skip to content

Commit

Permalink
ci: Use uv in more places in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 5, 2024
1 parent e6ce9fe commit ebf3ab2
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/check-yaml-format.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Check YAML format

on:
push:
branches:
Expand All @@ -20,10 +22,10 @@ jobs:
files: |
_data/**/*.yml
- name: Install yamllint
if: steps.changed-files.outputs.any_changed == 'true'
run: pipx install yamllint
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Lint YAML files
if: steps.changed-files.outputs.any_changed == 'true'
run: yamllint ${{ steps.changed-files.outputs.all_changed_files }}
run: uvx yamllint ${{ steps.changed-files.outputs.all_changed_files }}
10 changes: 8 additions & 2 deletions .github/workflows/metadata-extract-airbyte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:

steps:
- uses: actions/[email protected]
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Get Variants List - Airbyte
id: get-variants-list-airbyte
Expand Down Expand Up @@ -81,9 +84,12 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: extractor--${{ matrix.source-name }}--airbyte.json
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Upload Metadata
run: hub-utils upload-airbyte "/home/runner/work/hub/hub/_data/meltano/${{ matrix.plugin-name }}" extractor--${{ matrix.source-name }}--airbyte.json
17 changes: 14 additions & 3 deletions .github/workflows/metadata-extract-extractors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:

steps:
- uses: actions/[email protected]
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Get Variants List - SDK Extractors (p1)
id: get-variants-list-sdk-ex-p1
Expand Down Expand Up @@ -69,8 +72,12 @@ jobs:
aws-region: us-west-2
role-session-name: "GitHubActions"

- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

# This starts the attempts to install and extract metadata. Since we don't
# know what python versions are accepted we start with the latest and continue
Expand Down Expand Up @@ -142,8 +149,12 @@ jobs:
aws-region: us-west-2
role-session-name: "GitHubActions"

- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Install Python
uses: actions/setup-python@v5
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/metadata-extract-loaders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:

steps:
- uses: actions/[email protected]
- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Get Variants List - SDK Loaders
id: get-variants-list-sdk-loaders
Expand Down Expand Up @@ -58,8 +61,12 @@ jobs:
aws-region: us-west-2
role-session-name: "GitHubActions"

- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@edgarrmondragon/fix/custom-python-executable
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

# This starts the attempts to install and extract metadata. Since we don't
# know what python versions are accepted we start with the latest and continue
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/metadata-refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ jobs:
aws-region: us-west-2
role-session-name: "GitHubActions"

- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install hub-utils
run: pipx install git+https://github.com/meltano/hub-utils.git@main
run: uv tool install git+https://github.com/meltano/hub-utils.git@main

- name: Download Raw JSON Output
run: hub-utils download-metadata "/home/runner/work/downloaded_data" --ignore-list-str="extractors/tap-ga4/connorflyn,extractors/tap-ga4/meltanolabs,extractors/tap-ga4/sehnem,extractors/tap-jira/meltanolabs,extractors/tap-salesforce-commerce/hotgluexyz,loaders/target-s3/crowemi,loaders/target-s3-parquet/jkausti,extractors/tap-rest-api-msdk/widen"
Expand All @@ -45,7 +49,7 @@ jobs:

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-plugin-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
id: plugin-install
run: |
pipx install ${{ env.PIP_URL }} 2>&1 | tee install-output.txt
echo "::set-output name=failed::${PIPESTATUS[0]}"
echo "failed=${PIPESTATUS[0]}" >> $GITHUB_ENV
- name: Create installation failure log
if: steps.plugin-install.outputs.failed == '1'
Expand Down

0 comments on commit ebf3ab2

Please sign in to comment.