-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update GHA CI build (#72) * Update GHA CI build * Update job for current directory structure * reorg: prelude * dx, factory pattern, ci * bump prisma * wip: dao * oop * oop? Co-authored-by: Matt Boulanger <Celeo@users.noreply.github.com>
- Loading branch information
1 parent
54bd467
commit da3fe1b
Showing
93 changed files
with
1,767 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: PNPM Setup | ||
description: Setup PNPM and cache PNPM dependencies | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: pnpm/action-setup@v2.0.1 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Prisma Setup | ||
description: Generate/cache Prisma client | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Cache Prisma client | ||
id: cache-prisma | ||
uses: actions/cache@v3 | ||
with: | ||
path: core/src/prisma.rs | ||
# FIXME: maybe it is just `act`, but this keeps failing: An internal error has occurred in cache backend. | ||
key: ${{ runner.os }}-prisma-${{ hashFiles('**/schema.prisma') }} | ||
|
||
- name: Generate Prisma client | ||
working-directory: core | ||
if: steps.cache-prisma.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: cargo run -p prisma --release -- generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Rust Setup | ||
description: Generate/cache Rust dependencies and prisma client | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Cache cargo registry | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo index | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo build | ||
uses: actions/cache@v3 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Stump-CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-rust: | ||
name: Rust checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: System setup | ||
run: CHECK_NODE=0 CHECK_CARGO=0 DEV_SETUP=0 ./scripts/system-setup.sh | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/rust-setup | ||
|
||
- name: Setup prisma | ||
uses: ./.github/actions/prisma-setup | ||
|
||
- name: Run cargo checks | ||
run: | | ||
cargo fmt --all -- --check | ||
cargo clippy -- -D warnings | ||
# - name: Run tests | ||
# run: | | ||
# cargo integration-tests | ||
|
||
check-typescript: | ||
name: TypeScript checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Setup pnpm and typescript | ||
uses: ./.github/actions/pnpm-setup | ||
|
||
- name: Run type checks | ||
run: pnpm tsc:checks | ||
|
||
# release: | ||
# name: Release (${{ matrix.platform }}) | ||
# runs-on: ${{ matrix.platform }} | ||
# # Release only runs on push to main. TODO: can I make this trigger on tag? | ||
# if: github.event_name != 'pull_request' | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# platform: [ubuntu-latest, macos-latest, windows-latest] | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Install Rust | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: stable | ||
# profile: minimal | ||
# override: true | ||
# # TODO: clippy?? | ||
# components: rustfmt, rust-src | ||
|
||
# # TODO: figure out caching for rust deps | ||
|
||
# - name: Generate Prisma client | ||
# uses: ./.github/actions/generate-prisma-client | ||
|
||
# TODO: pnpm setup | ||
# TODO: docker builds -> maybe this helps? https://github.com/devture/matrix-corporal/blob/master/.gitlab-ci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ node_modules | |
$houdini | ||
*.log | ||
.eslintcache | ||
dist | ||
**/dist/* | ||
!**/dist/.placeholder | ||
build | ||
|
||
# rust | ||
|
Oops, something went wrong.