|
28 | 28 | ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/weaveworks-common |
29 | 29 | - name: Lint |
30 | 30 | run: make lint |
| 31 | + |
| 32 | + protos: |
| 33 | + runs-on: ubuntu-20.04 |
| 34 | + steps: |
| 35 | + - name: Checkout Repo |
| 36 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 37 | + - name: Setup Git safe.directory |
| 38 | + run: | |
| 39 | + echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively." |
| 40 | + echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global" |
| 41 | + git config --system --add safe.directory $GITHUB_WORKSPACE |
| 42 | + # Commands in the Makefile are hardcoded with an assumed file structure of the CI container |
| 43 | + # Symlink ensures paths specified in previous commands don’t break |
| 44 | + - name: Sym Link Expected Path to Workspace |
| 45 | + run: | |
| 46 | + mkdir -p /go/src/github.com/cortexproject/weaveworks-common |
| 47 | + ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/weaveworks-common |
| 48 | + - name: CheckProtos |
| 49 | + run: make check-protos |
| 50 | + |
| 51 | + test: |
| 52 | + runs-on: ubuntu-20.04 |
| 53 | + container: |
| 54 | + image: quay.io/cortexproject/build-image:master-0ddced051 |
| 55 | + steps: |
| 56 | + - name: Checkout Repo |
| 57 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 58 | + - name: Setup Git safe.directory |
| 59 | + run: | |
| 60 | + echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively." |
| 61 | + echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global" |
| 62 | + git config --system --add safe.directory $GITHUB_WORKSPACE |
| 63 | + # Commands in the Makefile are hardcoded with an assumed file structure of the CI container |
| 64 | + # Symlink ensures paths specified in previous commands don’t break |
| 65 | + - name: Sym Link Expected Path to Workspace |
| 66 | + run: | |
| 67 | + mkdir -p /go/src/github.com/cortexproject/weaveworks-common |
| 68 | + ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/weaveworks-common |
| 69 | + - name: Test |
| 70 | + run: make test |
0 commit comments