chore: Update CICD #910
Workflow file for this run
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
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='[email protected]' commit -m 'init for pr action' | |
- 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 |