diff --git a/.github/workflows/Jobs.yml b/.github/workflows/Jobs.yml new file mode 100644 index 0000000..b3d77c5 --- /dev/null +++ b/.github/workflows/Jobs.yml @@ -0,0 +1,108 @@ +name: Tests + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + format: + name: Prettier + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - 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@v3 + 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 + + lint: + name: ESLint + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - 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@v3 + 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 + + test: + name: Matchstick + runs-on: ubuntu-latest + container: node:18 + + 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@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run codegen + run: yarn codegen + + - name: Run build + run: yarn build:local + + - name: Run tests + run: yarn test diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 9dd0fcd..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Format - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - format: - name: Prettier - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v3 - 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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 358e428..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Lint - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - lint: - name: ESLint - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v3 - 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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 70ff74b..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Tests - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - tests: - name: Matchstick - runs-on: ubuntu-latest - container: node:18 - - 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@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: "yarn" - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Run codegen - run: yarn codegen - - - name: Run build - run: yarn build:local - - - name: Run tests - run: yarn test diff --git a/subgraphs/chamber/schema.graphql b/subgraphs/chamber/schema.graphql index d8bdd0a..bc6424d 100644 --- a/subgraphs/chamber/schema.graphql +++ b/subgraphs/chamber/schema.graphql @@ -19,7 +19,6 @@ type OwnershipTransferred @entity(immutable: true) { transactionHash: Bytes! } - type ChangedGuard @entity(immutable: true) { id: ID! guard: Bytes! # address diff --git a/subgraphs/chamber/subgraph.yaml b/subgraphs/chamber/subgraph.yaml index fb4d95c..c1f9111 100644 --- a/subgraphs/chamber/subgraph.yaml +++ b/subgraphs/chamber/subgraph.yaml @@ -1,6 +1,4 @@ specVersion: 1.0.0 -indexerHints: - prune: auto schema: file: ./schema.graphql dataSources: