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

Gravatar Tests for our CI pipeline #40

Merged
merged 14 commits into from
Sep 8, 2022
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
13 changes: 0 additions & 13 deletions .github/workflows/compile-CI.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/compile-and-test-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Compile Rescript & Test template graphs - CI
on: pull_request
jobs:
publish:
name: Compile & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: cd package && yarn
- run: cd package && yarn res:build
- name: Cache graph node_modules
id: cache_graph
uses: actions/cache@v2
with:
path: ./templates/gravatar-test/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('./templates/gravatar-test/yarn.lock') }}
- name: install graph packages
if: steps.cache_graph.outputs.cache-hit != 'true'
id: install_node_packages_graph
run: cd templates/gravatar-test && yarn
- run: cd templates/gravatar-test && yarn codegen
- run: cd templates/gravatar-test && yarn uncrashable-dev
- run: cd templates/gravatar-test && yarn test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ graphql_ppx_cache/

.DS_Store

.docusaurus
.docusaurus
Empty file added package/.gitignore
Empty file.
9 changes: 0 additions & 9 deletions package/.merlin

This file was deleted.

3 changes: 3 additions & 0 deletions templates/gravatar-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ An example to help you get started with The Graph. For more information see the
## Testing

Run `yarn` to download the matchstick helper package
Run `brew install postgresql` or `sudo apt install postgresql` for mac / linux respctively
Extra step for mac - need to create a symlink for the new postgresql (may need to create the dir first for the cmd below to work)
`ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib`
Run `yarn test` to run the unit tests
4 changes: 2 additions & 2 deletions templates/gravatar-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"create": "graph create example --node https://api.thegraph.com/deploy/",
"create-local": "graph create example --node http://127.0.0.1:8020",
"codegen": "graph codegen",
"uncrashable-codegen": "node ./node_modules/@float-capital/float-subgraph-uncrashable/src/index.bs.js",
"uncrashable-dev": "node ../../package/src/index.bs.js",
"uncrashable-codegen": "node ./node_modules/@float-capital/float-subgraph-uncrashable/src/Index.bs.js",
"uncrashable-dev": "node ../../package/src/Index.bs.js",
Comment on lines +11 to +12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the subtle issue we were running into regarding casing. Seems mac is a bit more casing lenient.

"build": "graph build",
"test": "graph test",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
Expand Down
2 changes: 1 addition & 1 deletion templates/gravatar-test/tests/.latest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.5.3",
"timestamp": 1662101884650
"timestamp": 1662554488236
}
4 changes: 2 additions & 2 deletions templates/gravatar-test/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3500,9 +3500,9 @@ globals@^9.18.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==

"gluegun@git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep":
"gluegun@https://github.com/edgeandnode/gluegun#v4.3.1-pin-colors-dep":
version "4.3.1"
resolved "git+https://github.com/edgeandnode/gluegun.git#b34b9003d7bf556836da41b57ef36eb21570620a"
resolved "https://github.com/edgeandnode/gluegun#b34b9003d7bf556836da41b57ef36eb21570620a"
dependencies:
apisauce "^1.0.1"
app-module-path "^2.2.0"
Expand Down