Skip to content

Commit

Permalink
Merge pull request #14 from loreum-org/fix/actions
Browse files Browse the repository at this point in the history
Fix/actions
  • Loading branch information
xhad authored Mar 7, 2024
2 parents b909e89 + 290b45b commit 16a33a8
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 128 deletions.
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

0 comments on commit 16a33a8

Please sign in to comment.