-
Notifications
You must be signed in to change notification settings - Fork 13
Migrate from pipenv to uv
#1047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d789de9
099cc68
771c19a
6353ba6
25b1076
790d3c2
8a83f54
3d879bd
3534cae
3ffe950
76e8312
3b1c57f
921a92c
e11e7d2
b13dd73
a1ec8e6
6b94c1c
70042cf
842f235
bc99065
7fc8428
5b51375
120a19a
9971c58
742fbae
5b56f0d
cbc377e
5ed3ad3
49f547e
b9e2c94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # Test workflow for the Launchable CLI | ||
| # Runs tests, linting, type checking, and build verification | ||
|
|
||
| name: Test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [ main ] | ||
| paths-ignore: | ||
| - 'WORKSPACE' | ||
| - 'src/**' | ||
| pull_request: | ||
| paths-ignore: | ||
| - 'WORKSPACE' | ||
| - 'src/**' | ||
| schedule: | ||
| # This job runs at 00:00 JST every day. | ||
| - cron: '0 9 * * *' | ||
|
|
||
| env: | ||
| LAUNCHABLE_ORGANIZATION: "launchableinc" | ||
| LAUNCHABLE_WORKSPACE: "cli" | ||
| GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | ||
| GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-22.04, windows-latest] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we need to set multiple Python versions?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With |
||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3 | ||
| with: | ||
| enable-cache: true | ||
| cache-dependency-glob: "uv.lock" | ||
|
|
||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 | ||
| with: | ||
| java-version: 8 | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --dev | ||
|
|
||
| - name: Test package build | ||
| run: uv build | ||
|
|
||
| - name: Type check | ||
| run: uv run poe type | ||
|
|
||
| - name: Lint with flake8 | ||
| run: uv run poe lint | ||
| - name: Pull request validation | ||
| run: | | ||
| # Install Launchable CLI from this repo's code as a global tool | ||
| uv tool install . | ||
| set -x | ||
| launchable verify | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't change the command name??
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will change the command name in another PR. |
||
| # Tell Launchable about the build you are producing and testing | ||
| launchable record build --name ${GITHUB_RUN_ID} | ||
| launchable record session --build ${GITHUB_RUN_ID} --flavor os=${{ matrix.os }} --flavor python=$(cat .python-version) > session.txt | ||
| # Find 25% of the relevant tests to run for this change | ||
| find tests -name test_*.py | grep -v tests/data | launchable subset --target 25% --session $(cat session.txt) --rest launchable-remainder.txt file > subset.txt | ||
| function record() { | ||
| # Record test results | ||
| LAUNCHABLE_SLACK_NOTIFICATION=true launchable record tests --session $(cat session.txt) file test-results/*.xml | ||
| } | ||
| trap record EXIT | ||
| # Test subset of tests | ||
| uv run poe test-xml $(tr '\r\n' '\n' < subset.txt) | ||
| # Test rest of tests | ||
| uv run poe test-xml $(tr '\r\n' '\n' < launchable-remainder.txt) | ||
| shell: bash | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.6.15 | ||
| 3.13 |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.