Skip to content

Querier caching

Querier caching #1067

name: "Enforcing go mod tidy in PRs Workflow"
on: [pull_request]
jobs:
go_mod_tidy_job:
runs-on: ubuntu-latest
container: rishabhpoddar/supertokens_go_driver_testing
steps:
- uses: actions/checkout@v2
# When using actions/checkout in a custom container, the directory is not treated as a git repo and does not have a .git directory, therefore we need to initialize it as a git repo. This will allows us to track changes made after go mod tidy runs
- name: Create a new git repository
run: git init && git add --all && git -c user.name='test' -c user.email='test@example.com' commit -m 'init for pr action'
- name: Install latest go
run: wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin && rm go1.21.3.linux-amd64.tar.gz
- name: Go mod tidy for root project
run: go mod tidy
- name: Go mod tidy for example apps
working-directory: ./examples
run: go mod tidy
- name: Check for file changes by go mod tidy
run: git status | grep -q 'nothing to commit, working directory clean' && exit 0 || exit 1