-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cache library, use miniredis for testing, add additional bench…
…marks. (#14) Update cache library, Update logging library, use miniredis for testing, add additional benchmarks.
- Loading branch information
1 parent
12e4237
commit 61d7a45
Showing
34 changed files
with
1,477 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Test and release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 3 * * *" | ||
|
||
env: | ||
GO_VERSION: ">=1.21" | ||
|
||
jobs: | ||
# This job is responsible for preparation of the build | ||
# environment variables. | ||
prepare: | ||
name: Preparing build context | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
id: cache | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
cache-dependency-path: "**/*.sum" | ||
|
||
- name: Go get dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
go get ./... | ||
# This job is responsible for running tests and linting the codebase | ||
test: | ||
name: "Unit testing" | ||
# needs: [prepare] | ||
runs-on: ubuntu-latest | ||
container: golang:1 | ||
# container: github/super-linter:v4 | ||
needs: [prepare] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
cache-dependency-path: "**/*.sum" | ||
|
||
- name: Install dependencies | ||
run: | | ||
apt-get update | ||
apt-get install ca-certificates make -y | ||
update-ca-certificates | ||
go mod tidy | ||
get -u -v ./... | ||
go mod tidy -v | ||
- name: Run unit tests | ||
run: | | ||
CI_RUN=${CI} make test | ||
# if go.mod or go.sum have changed then commit the changes to the repository | ||
- name: Commit changes | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
git add go.mod go.sum | ||
git commit -m "Update go.mod and go.sum" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
graphql-proxy | ||
test.sh | ||
banned.json* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.