run diff in each job (#6094)
This commit is contained in:
parent
65f076a63b
commit
5a9d3cfc70
|
@ -1,24 +1,6 @@
|
|||
name: Sims
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
diff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
id: git_diff
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- name: Fail if no changes
|
||||
# this is used to notify the other jobs that there are no changes and so they should not run
|
||||
run: exit 1
|
||||
if: "env.GIT_DIFF == ''"
|
||||
|
||||
cleanup-runs:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
|
||||
|
@ -37,7 +19,7 @@ jobs:
|
|||
|
||||
install-runsim:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, diff]
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/setup-go@v2-beta
|
||||
- name: install runsim
|
||||
|
@ -50,52 +32,92 @@ jobs:
|
|||
|
||||
test-sim-nondeterminism:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim, diff]
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
if: "env.GIT_DIFF != ''"
|
||||
- name: test-sim-nondeterminism
|
||||
run: |
|
||||
make test-sim-nondeterminism
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
test-sim-import-export:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim, diff]
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
if: "env.GIT_DIFF != ''"
|
||||
- name: test-sim-import-export
|
||||
run: |
|
||||
make test-sim-import-export
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
test-sim-after-import:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim, diff]
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
if: "env.GIT_DIFF != ''"
|
||||
- name: test-sim-after-import
|
||||
run: |
|
||||
make test-sim-after-import
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
test-sim-multi-seed-short:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim, diff]
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
if: "env.GIT_DIFF != ''"
|
||||
- name: test-sim-multi-seed-short
|
||||
run: |
|
||||
make test-sim-multi-seed-short
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
|
Loading…
Reference in New Issue