Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI/CD workflows #139

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
07e0eef
fix check-app workflow
lindsaymoralesb Sep 26, 2024
4e409cb
update checkout version (warning) and add verbose output
lindsaymoralesb Sep 27, 2024
0946568
fix typos workflow
lindsaymoralesb Sep 27, 2024
a32cde3
fix format
lindsaymoralesb Sep 27, 2024
13820aa
fix lint errors
lindsaymoralesb Sep 27, 2024
49077f4
fix ts issues
lindsaymoralesb Sep 27, 2024
2eb37c8
fix format
Sep 27, 2024
fdb1e3d
remove pnpm version from workflow
lindsaymoralesb Sep 27, 2024
c3c5de7
fix eslint and prettier conflicts
lindsaymoralesb Sep 28, 2024
850889b
fix ts issues p1
lindsaymoralesb Sep 28, 2024
45fb744
fix ts issues p2
lindsaymoralesb Sep 28, 2024
0387446
fix ts issues p3
lindsaymoralesb Sep 28, 2024
26711e9
fix scarb fmt
lindsaymoralesb Sep 28, 2024
836ec0f
set specific scarb version
lindsaymoralesb Sep 28, 2024
8e323d3
fix workflow syntax
lindsaymoralesb Sep 28, 2024
42675d8
undo verbose for debugging cicd
lindsaymoralesb Sep 28, 2024
994c725
ignore failing tests
lindsaymoralesb Sep 28, 2024
2aed886
Merge branch 'main' of github.com:lindsaymoralesb/afk_monorepo into f…
lindsaymoralesb Sep 30, 2024
3277d11
fix formatting (eslint & prettier)
lindsaymoralesb Sep 30, 2024
aa1eb6e
fix typos
lindsaymoralesb Sep 30, 2024
a2ab6fc
fix typos config
lindsaymoralesb Sep 30, 2024
9cd2eaf
add missing quotation
lindsaymoralesb Sep 30, 2024
d5eba27
fix config path
lindsaymoralesb Sep 30, 2024
982d157
fix config path
lindsaymoralesb Sep 30, 2024
68ac811
fix ts issues
lindsaymoralesb Sep 30, 2024
5dd3b0f
scarb fmt
lindsaymoralesb Sep 30, 2024
c521a4e
upgrade @nostr-dev-kit/ndk
lindsaymoralesb Sep 30, 2024
0a4b51e
upgrade @nostr-dev-kit/ndk
lindsaymoralesb Sep 30, 2024
1cff141
fix nostr-dev-kit version mismatch
lindsaymoralesb Oct 1, 2024
c43d477
add apps/website cicd
lindsaymoralesb Oct 2, 2024
a872e8f
add apps/data-backend cicd
lindsaymoralesb Oct 2, 2024
7ce39b9
git add apps/pwa cicd
lindsaymoralesb Oct 2, 2024
4ea06c7
fix errors
lindsaymoralesb Oct 2, 2024
6df109a
Merge branch 'main' of github.com:lindsaymoralesb/afk_monorepo into f…
lindsaymoralesb Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/afk-community.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/config/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
ba = "ba"

[files]
extend-exclude = ["/**/patches/**", "/**/assets/**"]
extend-exclude = ["/**/patches/**", "/**/assets/**", "/**/src/config/**", "**/*.config.ts"]
64 changes: 64 additions & 0 deletions .github/workflows/data-backend-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Data Backend App

on:
push:
branches:
- main
paths:
- "apps/data-backend/**"
pull_request:
branches:
- main
paths:
- "apps/data-backend/**"

jobs:
check-app:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/data-backend

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: |
if [ -f "apps/data-backend/pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
else
pnpm install
fi

- name: Prettier Format Check
run: pnpm prettier:check

- name: TypeScript Check
run: pnpm ts:check

- name: Build
run: pnpm build
64 changes: 64 additions & 0 deletions .github/workflows/mobile-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Mobile App

on:
push:
branches:
- main
paths:
- "apps/mobile/**"
pull_request:
branches:
- main
paths:
- "apps/mobile/**"

jobs:
check-app:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/mobile

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: |
if [ -f "apps/mobile/pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
else
pnpm install
fi

- name: Prettier Format Check
run: pnpm format:check

- name: ESLint Check
run: pnpm lint

- name: TypeScript Check
run: pnpm ts:check
64 changes: 64 additions & 0 deletions .github/workflows/pwa-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: PWA

on:
push:
branches:
- main
paths:
- "apps/pwa/**"
pull_request:
branches:
- main
paths:
- "apps/pwa/**"

jobs:
check-app:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/pwa

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: |
if [ -f "apps/pwa/pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
else
pnpm install
fi

- name: Prettier Format Check
run: pnpm prettier:check

- name: Lint
run: pnpm lint

- name: TypeScript Check
run: pnpm ts:check
10 changes: 7 additions & 3 deletions .github/workflows/starknet-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: '2.6.5'
- name: Scarb version
run: scarb --version
working-directory: onchain/cairo
Expand All @@ -22,12 +24,14 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: '2.6.5'
- name: Scarb version
run: scarb --version
working-directory: onchain/cairo
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: '0.25.0'
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/web-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Web App

on:
push:
branches:
- main
paths:
- "apps/website/**"
pull_request:
branches:
- main
paths:
- "apps/website/**"

jobs:
check-app:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/website

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: |
if [ -f "apps/website/pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
else
pnpm install
fi

- name: Prettier Format Check
run: pnpm prettier:check

- name: ESLint Check
run: pnpm lint

- name: TypeScript Check
run: pnpm ts:check
5 changes: 4 additions & 1 deletion apps/data-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"test": "echo \"Error: no test specified\" && exit 1",
"prisma:generate": "npx prisma generate",
"prisma:push": "npx prisma db push",
"prisma:setup": "npx prisma generate && npx prisma db push"
"prisma:setup": "npx prisma generate && npx prisma db push",
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
"prettier:check": "prettier --check \"src/**/*.{ts,tsx}\"",
"ts:check": "tsc --noEmit"
},
"keywords": [],
"author": "",
Expand Down
20 changes: 11 additions & 9 deletions apps/data-backend/src/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApolloServer, gql } from 'apollo-server';
import { ApolloServer, gql } from "apollo-server";
const { prisma } = require("indexer-prisma");

//GraphQL schema definitions
Expand Down Expand Up @@ -48,19 +48,21 @@ const typeDefs = gql`
const resolvers = {
Query: {
buyTokens: () => prisma.buy_token.findMany(),
buyToken: (_parent, { transactionHash }) => prisma.buy_token.findUnique({
where: { transactionHash },
}),
buyToken: (_parent, { transactionHash }) =>
prisma.buy_token.findUnique({
where: { transactionHash },
}),
tokenDeploys: () => prisma.token_deploy.findMany(),
tokenDeploy: (_parent, { memecoinAddress }) => prisma.token_deploy.findUnique({
where: { memecoin_address: memecoinAddress },
}),
tokenDeploy: (_parent, { memecoinAddress }) =>
prisma.token_deploy.findUnique({
where: { memecoin_address: memecoinAddress },
}),
},
};

// Create the Apollo Server
export const server = new ApolloServer({
export const server = new ApolloServer({
typeDefs,
resolvers,
context: () => ({ prisma }),
});
});
Loading
Loading