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/actions #14

Merged
merged 13 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
102 changes: 102 additions & 0 deletions .github/workflows/Jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Lint, Format, and Test

on: push

jobs:
tests:
name: Matchstick
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

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

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run codegen
run: yarn codegen

- name: Run build
run: yarn build

- name: Run tests
run: yarn test

lint:
name: ESLint
runs-on: ubuntu-latest

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run ESLint
run: yarn lint

format:
name: Prettier
runs-on: ubuntu-latest

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run Prettier
run: yarn format:check
40 changes: 0 additions & 40 deletions .github/workflows/format.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/lint.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/tests.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"mac": "docker-compose --file mac.yaml up --build",
"intel": "docker-compose --file intel.yaml up --build",
"codegen": "lerna run codegen",
"build": "lerna run build",
"build:local": "lerna run build:local",
"build:goerli": "lerna run build:goerli",
"build:mainnet": "lerna run build:mainnet",
Expand Down
1 change: 0 additions & 1 deletion subgraphs/chamber/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type OwnershipTransferred @entity(immutable: true) {
transactionHash: Bytes!
}


type ChangedGuard @entity(immutable: true) {
id: ID!
guard: Bytes! # address
Expand Down
1 change: 1 addition & 0 deletions subgraphs/loreum-nft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"start": "yarn codegen && yarn build:local && yarn remove:local && yarn create:local && yarn deploy:local",
"codegen": "graph codegen",
"build": "graph build subgraph.yaml",
"build:local": "graph build subgraph.yaml --network localhost",
"create:local": "graph create --node http://localhost:8020/ loreum-nft --network localhost",
"remove:local": "graph remove --node http://localhost:8020/ loreum-nft --network localhost",
Expand Down
Loading