Skip to content

Commit

Permalink
Merge branch 'main' into docs
Browse files Browse the repository at this point in the history
# Conflicts:
#	poetry.lock
#	website/package.json
#	website/pnpm-lock.yaml
  • Loading branch information
zifeo committed Mar 25, 2024
2 parents 4189225 + 055b0fc commit 479eaad
Show file tree
Hide file tree
Showing 363 changed files with 45,754 additions and 22,898 deletions.
7 changes: 6 additions & 1 deletion .ghjk/lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@
},
"portRef": "npmi_npm@0.1.0",
"packageName": "@bytecodealliance/jco"
},
"f4760b34b6c9f9f96207cfb380deb77007a212a60bd10bdb3dc9d20b94c2785c": {
"version": "v8.15.2",
"depConfigs": {},
"portRef": "pnpm_ghrel@0.1.0"
}
}
},
Expand Down Expand Up @@ -746,7 +751,7 @@
}
},
{
"version": "v8.8.0",
"version": "v8.15.2",
"port": {
"ty": "denoWorker@v1",
"name": "pnpm_ghrel",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- uses: actions/cache@v4
with:
path: .venv
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
GHJK_VERSION: "f380522"
DENO_VERSION: "1.40.1"
DENO_VERSION: "1.41.0"
REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/typegate

jobs:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
with:
targets: ${{ matrix.target }}
# some targets don't use cross so will require the deps in the host
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ matrix.target }}
Expand All @@ -116,33 +116,33 @@ jobs:
# we cd next to the file so that the its parent dirs
# aren't present in the tar
cd target/${{ matrix.target }}/release/
tar czvf ../../../meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
tar czvf ../../../meta-cli-thin-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
cd ../../../
- if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
shell: bash
run: |
cargo build --release --locked --package meta-cli --target ${{ matrix.target }} --features typegate -v
cd target/${{ matrix.target }}/release/
tar czvf ../../../meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
tar czvf ../../../meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
cd ../../../
cargo build --release --locked --package meta-cli --target ${{ matrix.target }}
cd target/${{ matrix.target }}/release/
tar czvf ../../../meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
tar czvf ../../../meta-cli-thin-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
cd ../../../
# full meta-cli is not avail for arm64 linux (waiting on arm64 linux machines for Gh CI)
# fat meta-cli is not avail for arm64 linux (waiting on arm64 linux machines for Gh CI)
- if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.latest-tag.outputs.tag }}
file: "meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
asset_name: "meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
file: "meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
asset_name: "meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
overwrite: ${{ inputs.ovewriteArtifacts }}
- uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.latest-tag.outputs.tag }}
file: "meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
asset_name: "meta-cli-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
file: "meta-cli-thin-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
asset_name: "meta-cli-thin-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
overwrite: ${{ inputs.ovewriteArtifacts }}

typegraph:
Expand All @@ -168,7 +168,7 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- shell: bash
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
fetch-depth: 0
- uses: WyriHaximus/github-action-get-previous-tag@v1.4.0
id: latest-tag
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- shell: bash
run: |
cd meta-lsp
Expand Down
118 changes: 63 additions & 55 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ on:

env:
GHJK_VERSION: "f380522"
DENO_VERSION: "1.40.1"
DENO_VERSION: "1.41.0"
RUST_BACKTRACE: "full"
RUST_LOG: "info,swc_ecma_codegen=off,tracing::span=off"
DENO_DIR: deno-dir

jobs:
changes:
Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- shell: bash
run: |
sudo apt update
Expand Down Expand Up @@ -98,7 +99,7 @@ jobs:
with:
path: ${{ env.DENO_DIR }}
key: deno-mac-${{ hashFiles('**/deno.lock') }}
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- name: Cache .venv dir
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -146,7 +147,10 @@ jobs:
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock', '.ghjk/lock.json') }}
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
with:
# temporary fix
cache-key-prefix: ${{ matrix.os }}
- shell: bash
env:
WASM_FILE: target/debug/typegraph_core.wasm
Expand All @@ -171,55 +175,58 @@ jobs:
cargo run --locked --package meta-cli -- --help
cargo test --locked --package meta-cli
test-docker:
needs: changes
if: ${{ needs.changes.outputs.typegate == 'true' }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
# FIXME: try macos-14 runner once all actions support it
# docker buildx action broken as of 2024-02-09
- platform: linux/arm64
runner: custom-macos
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: scherermichael-oss/action-has-permission@master
id: check
with:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
if: steps.check.outputs.has-permission
with:
registry: docker.io
username: zifeo
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build with cache (internal)
uses: docker/build-push-action@v5
if: steps.check.outputs.has-permission
with:
file: dev/Dockerfile
platforms: ${{ matrix.platform }}
push: false
cache-from: type=registry,ref=docker.io/zifeo/metatype-cache:ci
cache-to: type=registry,ref=docker.io/zifeo/metatype-cache:ci,mode=max
# check target runs extra validation steps in the Dockerfile
target: check
- name: Build without cache (external)
uses: docker/build-push-action@v5
if: "! steps.check.outputs.has-permission"
with:
file: dev/Dockerfile
platforms: linux/amd64
push: false
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/typegate:latest
target: check
# test-docker:
# needs: changes
# if: ${{ needs.changes.outputs.typegate == 'true' }}
# runs-on: ${{ matrix.runner }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - platform: linux/amd64
# runner: ubuntu-latest
# # - platform: linux/amd64
# # runner: custom-ubuntu-large
# # FIXME: try macos-14 runner once all actions support it
# # docker buildx action broken as of 2024-02-09
# # TODO
# # - platform: linux/arm64
# # runner: custom-macos
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-buildx-action@v3
# - uses: scherermichael-oss/action-has-permission@master
# id: check
# with:
# required-permission: write
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: docker/login-action@v3
# if: steps.check.outputs.has-permission
# with:
# registry: docker.io
# username: zifeo
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Build with cache (internal)
# uses: docker/build-push-action@v5
# if: steps.check.outputs.has-permission
# with:
# file: dev/Dockerfile
# platforms: ${{ matrix.platform }}
# push: false
# cache-from: type=registry,ref=docker.io/zifeo/metatype-cache:ci
# cache-to: type=registry,ref=docker.io/zifeo/metatype-cache:ci,mode=max
# # check target runs extra validation steps in the Dockerfile
# target: check
# - name: Build without cache (external)
# uses: docker/build-push-action@v5
# if: "! steps.check.outputs.has-permission"
# with:
# file: dev/Dockerfile
# platforms: linux/amd64
# push: false
# cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/typegate:latest
# target: check

test-full:
needs: changes
Expand Down Expand Up @@ -286,7 +293,7 @@ jobs:
- run: |
sudo apt update
sudo apt install -y --no-install-recommends zstd
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- shell: bash
env:
WASM_FILE: target/debug/typegraph_core.wasm
Expand Down Expand Up @@ -336,6 +343,7 @@ jobs:
deno cache --import-map typegate/import_map.json \
typegate/src/main.ts \
typegate/tests/utils/*.ts \
typegate/tests/runtimes/wasmedge/*.ts \
dev/deps.ts \
dev/utils.ts
deno --unstable-worker-options --unstable-net coverage ./coverage --lcov > coverage.lcov
Expand All @@ -353,7 +361,7 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: metatypedev/setup-ghjk@32fe7ad4eab41d5e62189208afa6fe17112a5563
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- shell: bash
run: |
cd meta-lsp
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ meta-lsp/*.vsix
typegate/workers
typegate/codegen
typegate/tests/prisma-migrations
typegate/tests/e2e/cli/prisma-migrations
typegate/tests/importers/copy/
.env
typegate/native/bindings.json
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ repos:
- id: deno-fmt
name: Deno format
language: system
entry: bash -c 'cd typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs && cd ../dev && deno fmt'
entry: bash -c 'cd typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs && cd ../dev && deno fmt && cd ../typegraph/node && deno fmt --ignore=node_modules,dist'
pass_filenames: false
types:
- ts
files: ^(typegate|dev)/
files: ^(typegate|dev|typegraph/node)/
- id: deno-lint
name: Deno lint
language: system
Expand Down
Loading

0 comments on commit 479eaad

Please sign in to comment.