Skip to content

Commit a6690b3

Browse files
authored
Merge branch '01Joseph-Hwang10:master' into master
2 parents b8e9e12 + dc67d1a commit a6690b3

14 files changed

+449
-782
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: Release and publish packages
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v4
17+
id: release
18+
with:
19+
token: ${{ secrets.GH_PAT }}
20+
config-file: release-please-config.json
21+
manifest-file: .release-please-manifest.json
22+
23+
# Check-out the repository
24+
- uses: actions/checkout@v4
25+
if: ${{ steps.release.outputs.release_created == 'true' }}
26+
with:
27+
ref: ${{ github.event.after }}
28+
29+
# Set up Python
30+
- uses: actions/setup-python@v2
31+
if: ${{ steps.release.outputs.release_created == 'true' }}
32+
with:
33+
python-version: 3.11
34+
35+
# Set up Poetry
36+
- uses: snok/install-poetry@v1
37+
if: ${{ steps.release.outputs.release_created == 'true' }}
38+
with:
39+
virtualenvs-create: true
40+
virtualenvs-in-project: true
41+
42+
# Load cached dependencies
43+
- name: Load cached venv
44+
id: cache-dependencies
45+
uses: actions/cache@v3
46+
if: ${{ steps.release.outputs.release_created == 'true' }}
47+
with:
48+
path: .venv
49+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
50+
51+
# Install dependencies
52+
- if: ${{ steps.release.outputs.release_created == 'true' && steps.cache-dependencies.outputs.cache-hit != 'true' }}
53+
run: poetry install --all-extras
54+
55+
# Configure basic credentials for PyPI
56+
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}"
57+
if: ${{ steps.release.outputs.release_created == 'true' }}
58+
59+
# Build and publish package
60+
- run: poetry build
61+
if: ${{ steps.release.outputs.release_created == 'true' }}
62+
63+
- run: poetry publish
64+
if: ${{ steps.release.outputs.release_created == 'true' }}

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

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Test and Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.11
16+
17+
- uses: snok/install-poetry@v1
18+
with:
19+
virtualenvs-create: true
20+
virtualenvs-in-project: true
21+
22+
- id: cache-dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: .venv
26+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
27+
28+
- id: install-dependencies
29+
if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
30+
run: poetry install --all-extras
31+
32+
- id: install-jtd-codegen
33+
run: source ./ci/install-jtd-codegen
34+
35+
- run: poetry run poe test jtd_codebuild/tests
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v2
42+
with:
43+
python-version: 3.11
44+
45+
- uses: snok/install-poetry@v1
46+
with:
47+
virtualenvs-create: true
48+
virtualenvs-in-project: true
49+
50+
- id: cache-dependencies
51+
uses: actions/cache@v3
52+
with:
53+
path: .venv
54+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
55+
56+
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
57+
run: poetry install --all-extras
58+
59+
- run: poetry run poe lint
60+
61+
check-format:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: actions/setup-python@v2
66+
with:
67+
python-version: 3.11
68+
69+
- uses: snok/install-poetry@v1
70+
with:
71+
virtualenvs-create: true
72+
virtualenvs-in-project: true
73+
74+
- id: cache-dependencies
75+
uses: actions/cache@v3
76+
with:
77+
path: .venv
78+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
79+
80+
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
81+
run: poetry install --all-extras
82+
83+
- run: poetry run poe check-format

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.7.0"
3+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2022 01Joseph-Hwang10
1+
Copyright 2023 01Joseph-Hwang10
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

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

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