Skip to content

Commit 9fa8878

Browse files
Merge pull request #6 from 01Joseph-Hwang10/ci-test
Ci test
2 parents c9be120 + cb40ae2 commit 9fa8878

File tree

5 files changed

+143
-18
lines changed

5 files changed

+143
-18
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
# Install dependencies
5252
- if: ${{ steps.release.outputs.release_created == 'true' && steps.cache-dependencies.outputs.cache-hit != 'true' }}
53-
run: poetry install
53+
run: poetry install --all-extras
5454

5555
# Configure basic credentials for PyPI
5656
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}"

.github/workflows/test-and-lint.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,10 @@ jobs:
2727

2828
- id: install-dependencies
2929
if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
30-
run: poetry install
30+
run: poetry install --all-extras
3131

3232
- id: install-jtd-codegen
33-
run: |
34-
# Download and unpack jtd-codegen
35-
jtd_codegen_archive_url=$(curl https://api.github.com/repos/jsontypedef/json-typedef-codegen/releases | jq '.[0].assets.[] | select(.name | test("linux-gnu"))' | jq -r '.browser_download_url')
36-
wget $jtd_codegen_archive_url -O jtd-codegen.zip
37-
unzip jtd-codegen.zip
38-
39-
# Install jtd-codegen
40-
chmod +x jtd-codegen
41-
mv jtd-codegen .jtd-codegen/jtd-codegen
42-
export PATH=$PATH:$(pwd)/.jtd-codegen
43-
44-
# Clean up
45-
rm -f jtd-codegen.zip
33+
run: source ./ci/install-jtd-codegen
4634

4735
- run: poetry run poe test jtd_codebuild/tests
4836

@@ -66,7 +54,7 @@ jobs:
6654
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
6755

6856
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
69-
run: poetry install
57+
run: poetry install --all-extras
7058

7159
- run: poetry run poe lint
7260

@@ -90,6 +78,6 @@ jobs:
9078
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
9179

9280
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
93-
run: poetry install
81+
run: poetry install --all-extras
9482

9583
- run: poetry run poe check-format

ci/install-jtd-codegen

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Download and unpack jtd-codegen
4+
jtd_codegen_archive_url=$(curl https://api.github.com/repos/jsontypedef/json-typedef-codegen/releases | jq '.[0].assets' | jq '.[] | select(.name | test("linux-gnu"))' | jq -r '.browser_download_url')
5+
wget $jtd_codegen_archive_url -O jtd-codegen.zip
6+
unzip jtd-codegen.zip
7+
8+
# Install jtd-codegen
9+
chmod +x jtd-codegen
10+
mkdir -p .jtd-codegen
11+
mv jtd-codegen .jtd-codegen/jtd-codegen
12+
echo "$(pwd)/.jtd-codegen" >> $GITHUB_PATH
13+
14+
# Clean up
15+
rm -f jtd-codegen.zip

poetry.lock

Lines changed: 122 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ poethepoet = "^0.24.4"
2121

2222
[tool.poetry.group.test.dependencies]
2323
pytest = "^7.4.3"
24+
pydantic = "^2.6.3"
2425

2526

2627
[tool.poetry.scripts]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy