Skip to content

Commit

Permalink
chore: upgrade dependency and unify dependency management (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo authored Feb 22, 2023
1 parent c33e933 commit ea4ee6a
Show file tree
Hide file tree
Showing 34 changed files with 10,746 additions and 1,431 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,15 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}
- name: Build
uses: actions-rs/cargo@v1
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: "--locked --release --package meta-cli --target ${{ matrix.target }}"
- name: Compress
run: |
- run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../meta-cli-${{ github.ref_name }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
- name: Upload
uses: svenstaro/upload-release-action@v2
- uses: svenstaro/upload-release-action@v2
with:
tag: ${{ github.ref }}
file: "meta-cli-${{ github.ref_name }}-${{ matrix.target }}.tar.gz"
Expand All @@ -91,16 +88,14 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Build & publish
working-directory: typegraph
- working-directory: typegraph
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry install --sync
poetry build
poetry publish
- name: Upload
uses: svenstaro/upload-release-action@v2
- uses: svenstaro/upload-release-action@v2
with:
tag: ${{ github.ref }}
file: "typegraph/dist/*"
Expand Down Expand Up @@ -138,8 +133,7 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v${{ env.DENO_VERSION }}
- name: Bump version
id: bump
- id: bump
run: |
deno run -A dev/lock.ts --bump prerelease
echo "version=$(deno run -A dev/lock.ts --version)" >> $GITHUB_OUTPUT
Expand Down
69 changes: 41 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Install
working-directory: website
- working-directory: website
run: |
pnpm install --frozen-lockfile
- uses: pre-commit/[email protected]
Expand All @@ -88,8 +87,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: website/pnpm-lock.yaml
- name: Install and test build
working-directory: website
- working-directory: website
run: |
pnpm install --frozen-lockfile
pnpm lint
Expand All @@ -103,25 +101,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- uses: actions/download-artifact@v3
with:
name: meta
- run: tar -xvf meta.tar
- name: Install and test build
working-directory: typegraph
run: |
python3 -m venv ../.venv
source ../.venv/bin/activate
- run: |
tar -xvf meta.tar
python3 -m venv .venv
source .venv/bin/activate
cd typegraph
poetry install --sync
pytest -s tests
Expand All @@ -138,15 +135,19 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install and test build
run: |
- run: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install ./typegraph
cd typegraph
poetry install --sync
cd ..
cargo run --locked --package meta-cli -- --help
cargo test --locked --package meta-cli
tar -cvf meta.tar target/debug/meta
Expand Down Expand Up @@ -176,15 +177,19 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install and test build
run: |
- run: |
python3 -m venv .venv
${{ runner.activate }}
pip3 install ./typegraph
${{ matrix.activate }}
cd typegraph
poetry install --sync
cd ..
cargo run --locked --package meta-cli -- --help
cargo test --locked --package meta-cli
Expand Down Expand Up @@ -239,6 +244,9 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: arduino/setup-protoc@v1
with:
version: ${{ env.PROTOC_VERSION }}
Expand All @@ -250,12 +258,13 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: meta
- run: tar -xvf meta.tar
- name: Install and test build
run: |
- run: |
tar -xvf meta.tar
python3 -m venv .venv
source .venv/bin/activate
pip3 install ./typegraph
cd typegraph
poetry install --sync
cd ..
deno install -A -n deno_bindgen $DENO_BINDGEN_URL
OUT_DIR=target deno_bindgen -- --locked --package native -F deno
which py-tg
Expand All @@ -277,19 +286,23 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- uses: actions/download-artifact@v3
with:
name: meta
- run: tar -xvf meta.tar
- name: Install and test build
run: |
- run: |
tar -xvf meta.tar
python3 -m venv .venv
source .venv/bin/activate
pip3 install ./typegraph
cd typegraph
poetry install --sync
cd ..
cargo test --locked --exclude meta-cli --exclude native --workspace
test-docker:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: end-of-file-fixer
exclude: typegate/deno.lock
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.245"
rev: "v0.0.249"
hooks:
- id: ruff
- repo: https://github.com/psf/black
Expand Down
Loading

0 comments on commit ea4ee6a

Please sign in to comment.