Skip to content

Commit

Permalink
add cache go mod files
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Nov 17, 2024
1 parent 8ecf6e2 commit ae44b69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci_reuse_go_cas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# - name: Check pull request file size
# if: github.event_name == 'pull_request'
# run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/checkPR.sh | bash
# env:
# token: ${{ secrets.reporeading_token }}
# pr_number: ${{ github.event.number }}
- name: Check pull request file size
if: github.event_name == 'pull_request'
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/checkPR.sh | bash
env:
token: ${{ secrets.reporeading_token }}
pr_number: ${{ github.event.number }}

- name: CI
uses: untillpro/ci-action@master
Expand All @@ -58,7 +58,6 @@ jobs:
short-test: ${{ inputs.short_test }}
ignore-build: ${{ inputs.ignore_build }}
run-mod-tidy: false
stop-test: true
env:
CHARGEBEE_PUBLISHABLE_KEY: ${{ secrets.chargebee_token }}
CHARGEBEE_SITE_NAME: ${{ secrets.chargebee_sitename }}
Expand Down Expand Up @@ -86,8 +85,8 @@ jobs:
path: |
~/.cache/go-build
# - name: Check copyright
# run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/check_copyright.sh | bash -s "$(go env GOPATH)"
- name: Check copyright
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/check_copyright.sh | bash -s "$(go env GOPATH)"

# - name: Linters
# run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/gbash.sh | bash -s "$(go env GOPATH)"
- name: Linters
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/gbash.sh | bash -s "$(go env GOPATH)"
7 changes: 1 addition & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17347,7 +17347,6 @@ async function run() {
const ignoreRunBuild = core.getInput('ignore-build')
const testfolder = core.getInput('test-folder')
const shorttest = core.getInput ('short-test')
const stoptest = core.getInput ('stop-test')

const repositoryOwner = repository.split('/')[0] ||
github.context.payload && github.context.payload.repository && github.context.payload.repository.owner && github.context.payload.repository.owner.login
Expand Down Expand Up @@ -17445,11 +17444,7 @@ async function run() {
if (shorttest === "true"){
tststr=tststr + ' -short'
}
if (!stoptest){
await execute(tststr)
} else {
await execute('go mod tidy')
}
await execute(tststr)
}
if (testfolder.length != 0) {
await execute('cd .')
Expand Down
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ async function run() {
const ignoreRunBuild = core.getInput('ignore-build')
const testfolder = core.getInput('test-folder')
const shorttest = core.getInput ('short-test')
const stoptest = core.getInput ('stop-test')

const repositoryOwner = repository.split('/')[0] ||
github.context.payload && github.context.payload.repository && github.context.payload.repository.owner && github.context.payload.repository.owner.login
Expand Down Expand Up @@ -132,11 +131,7 @@ async function run() {
if (shorttest === "true"){
tststr=tststr + ' -short'
}
if (!stoptest){
await execute(tststr)
} else {
await execute('go mod tidy')
}
await execute(tststr)
}
if (testfolder.length != 0) {
await execute('cd .')
Expand Down

0 comments on commit ae44b69

Please sign in to comment.