Skip to content

Commit

Permalink
feat: Add PR checks workflow (#3)
Browse files Browse the repository at this point in the history
* feat: Add staticcheck linting

* fix: Fix workflow syntax error

* fix: Fix lint workflow

* fix: Fix go version

* yeah I don't know

* fix: Update staticcheck

* feat: Update README
  • Loading branch information
simse authored Sep 13, 2024
1 parent 01a7558 commit 5e5f495
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 6 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PR Checks

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: extractions/setup-just@v1

- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: '1.23.1'

- name: Build
run: just build

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: extractions/setup-just@v1

- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: '1.23.1'

- name: Install staticcheck
uses: dominikh/[email protected]
with:
version: '2024.1.1'
install-go: false
min-go-version: '1.23.1'

- name: Run lint
run: just lint

unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: extractions/setup-just@v1

- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: '1.23.1'

- name: Unit tests
run: go test ./...
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
- '*'
branches:
- main
pull_request:

permissions:
contents: write

jobs:
build:
Expand All @@ -25,7 +27,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: '^1.13.1'
go-version: '^1.23.1'

- name: Build binaries
run: just build
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[![Build and Release](https://github.com/simse/faster-graphql-codegen/actions/workflows/release.yml/badge.svg)](https://github.com/simse/faster-graphql-codegen/actions/workflows/release.yml)
# 🚀 faster-graphql-codegen 🚀
A reimplementation of graphql-codegen designed to be (much) faster than the original. It aims to be drop-in compatible where possible.

[Docs](https://faster-graphql-codegen.simse.io/) | [Quick Start](https://faster-graphql-codegen.simse.io/quick-start)

## Current functionality
- [x] Parse single graphql schema from file
- [ ] Parse and merge multiple graphql schemas
Expand All @@ -10,14 +13,14 @@ A reimplementation of graphql-codegen designed to be (much) faster than the orig
- [x] Comments
- [x] InputObjects
- [x] Objects
- [ ] Implements
- [ ] Custom Scalars
- [x] Implements
- [x] Custom Scalars
- [ ] Lots of other things
- [ ] Load .yaml config
- [x] Load .yaml config
- [ ] Load .js/.ts config
- [ ] Extract and generate types for queries
- [ ] Extract and generate types for mutations
- [ ] Monorepo support
- [x] Monorepo support

## Yo!
This is still just an experiment.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ build:
go build -ldflags="-s -w" -o "build/$output" .
done
done

lint:
staticcheck ./...

0 comments on commit 5e5f495

Please sign in to comment.