Commit Graph

24 Commits

Author SHA1 Message Date
Vishnu Bharathi
5830720dbf ci: remove changelog check and introduce changelog in PR template
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5520
GitOrigin-RevId: 94f9c54060e22e7cb4812b4fb5337d9391951b09
2022-08-22 04:44:47 +00:00
Samir Talwar
0e4d709285 Factor tool versions out into server/VERSIONS.json.
This helps us use the same versions locally as in CI. If you're using the Nix setup, it guarantees it.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5111
GitOrigin-RevId: 6e00cd7a78593df1e60fac37cc1195aba60e488f
2022-07-22 12:23:46 +00:00
Auke Booij
a7dbe95666 Hlint all Haskell code
So far we've only used `hlint` to lint the OSS code. This moves some things around to lint the Pro code as well.

Note that the CI action only runs `hlint` on Haskell files that are _changed_ by a PR, relative to its merge-base (usually `main`).

As a reminder, you can use the `ignore-server-hlint-checks` label to prevent this from blocking a merge.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3383
GitOrigin-RevId: d5779c63d780f526a1d58ae4107f0d5262a23ec1
2022-01-18 04:06:15 +00:00
Robert
a206d04062 server, CI: use ormolu as a formatter for Haskell sources
### Description

- sets up a Makefile target for running ormolu to format and check source code
- updates CI to run ormolu instead of stylish-haskell (and to check instead of format actively)

Compare #1679.

Here's the plan for merging this:
1. merge this PR; at this point, all PRs will fail CI unless they have the `ignore-server-format-checks` label set
2. merge follow-up PR #2404 that does nothing but actually reformats the codebase
3. tag the merge commit as `post-ormolu` (also on `graphql-engine`, for the benefits of community contributors)
4. provide the following script to any devs in order to update their branches:
   ```
   $ git checkout my-feature-branch
   $ git merge post-ormolu^
   $ make format
   $ git commit -a -m "reformat with ormolu"
   $ git merge -s ours post-ormolu
   ```
   (I'll put this in the commit message)

https://github.com/hasura/graphql-engine-mono/pull/2020

Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Swann Moreau <62569634+evertedsphere@users.noreply.github.com>
GitOrigin-RevId: 130f480a6d79967c8d045b7f3a6dec30b10472a7
2021-09-23 21:23:21 +00:00
Antoine Leblanc
fe22aa5407 ci: improve hlint messages
GitOrigin-RevId: 7547c2a08161989885b4e6c382c1e42cec809857
2021-05-04 21:52:55 +00:00
Vishnu Bharathi
9e6f878440 ci: removes shadow-pr github workflow
GitOrigin-RevId: a831b3d5fb0d398faf39b327617a70ee37e618f4
2021-02-04 11:34:06 +00:00
Vishnu Bharathi
4004789106 ci: use envs instead of templating
GitOrigin-RevId: 7f83e62073a5e2ac77c06760f383a2c2c9c43098
2021-02-02 06:22:59 +00:00
Antoine Leblanc
6494229f54 server: generalize functions (#393)
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
GitOrigin-RevId: 5d2140152a2a18601c785ea80a7689cbe3bd277e
2021-01-25 10:13:54 +00:00
Antoine Leblanc
591db631ea ci: run stylish haskell on all incoming PRs
### Description

This PR adds two new github actions: one in the OSS repo, one in the monorepo. The OSS action runs `stylish-haskell` on all files touched by the PR, and displays a warning for each file that was in need of a formatting. The monorepo action does the same thing, with a twist: if the branch is not a shadow copy of an OSS branch, we assume that it is a local branch, and simply push a new commit with the changes.

Furthermore, this PR upgrades our stylish-haskell config to add record formatting, as close as possible to our styleguide.

Both actions use the standard stylish-haskell, not our modified fork.

### Known limitation

The monorepo action does not handle forks: pushing to the branch will fail, and checking the branch out might fail too. This is probably acceptable since we don't use forks with the monorepo, but it wouldn't be hard to handle that gracefully.

GitOrigin-RevId: 814138c5b9826098e2e4ea192778fc0d93fbe390
2021-01-21 23:37:26 +00:00
Antoine Leblanc
3f87d9e886 ci: hlint suggestions do not mark the check as failed
Instead of using hlint's return value to determine whether the check was successful, we parse the output to see if there was any error. In practice, that means that hlint suggestions, which are translated as warnings on a pr, will no longer mark the check as failed.

GitOrigin-RevId: dff2a50180de0c5f0702a9799b1f6359499da6a5
2021-01-20 17:50:50 +00:00
Vishnu Bharathi
64a0a14fe2 includes deleted files while migrating OSS PR
GitOrigin-RevId: 91bfc73887b505c8654d0acfd528ec47b2147034
2020-12-23 06:00:17 +00:00
Vishnu Bharathi P
4ff84756ca uses event instead of input in shadow pr github action
GitOrigin-RevId: ccb772dc16d22e9a47da25f14d7f3a4f3eb445c7
2020-12-22 04:15:09 +00:00
Vishnu Bharathi
2f22e571e2 fixes permissions in shadow pr github action
GitOrigin-RevId: 6f6a4bab86c21e190c5b742ef9cb3118a186bf24
2020-12-22 03:23:21 +00:00
hasura-bot
05ccbff1ec Uses fallback migration logic for shadowing PRs
Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6378
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6378

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GitOrigin-RevId: 1db14333fa4f81ea7845846e9f20f6a89b3805d0
2020-12-22 02:48:58 +00:00
hasura-bot
920c6ea427 ci: add hlint escape hatch (#71)
* ci: add hlint escape hatch

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6164
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6164

* Applied changes to new workflow files.

* Add missing label trigger for lint worklow

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: 3e22c301a9412f7f77978b35f29c38c7876ac13f
2020-12-07 12:10:38 +00:00
Vishnu Bharathi P
06ab0e537b [skip ci] adds name for shadow pr github action
Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6250
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6250
GitOrigin-RevId: 3f7cc8dd834d81cf465d4b33feff49c8714aa18a
2020-11-25 05:15:57 +00:00
hasura-bot
d9821b85f2 [skip ci] adds a github action to shadow pull requests
* [skip ci] adds a github action to shadow pull requests

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6201
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6201

* uses setOutput instead of setting environment variable

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GitOrigin-RevId: 6897541d2377e8442839ec869a4d21d9f74c5f08
2020-11-25 04:59:42 +00:00
Auke Booij
33eb0fbcbb
server: avoid running hlint on an empty list of files (#6087) 2020-10-28 16:41:04 +01:00
Auke Booij
8d0afb6f92
server: SQL that grows (#6003)
Add a backend type extension parameter to some RQL types, following the ideas of the paper "Trees that grow" (Najd & Jones 2016)

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-22 22:42:27 +02:00
Auke Booij
a4113eb9a6
add hlint config, run hlint through a github action, add to dev.sh (#5957)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-16 13:55:18 +02:00
Aleksandra Sikora
547e658b6d
console: replace remote schema url in tests (#5011)
* console: replace remote schema url

* Rename lint to console lint
2020-06-08 17:45:43 +05:30
Aleksandra Sikora
45c8699e23
console: dependencies cleanup (#4705) 2020-06-02 13:44:45 +05:30
Aleksandra Sikora
41b3be82fb
workflow: add lint and format action for console (#4501) 2020-05-29 16:45:43 +05:30
Shahidh K Muhammed
5bc95d2b7a
add workflow automations, update changelog (#4079)
Co-authored-by: Aravind Shankar <aravind@hasura.io>
2020-03-29 12:01:30 +05:30