|
22 | 22 | version: v1.37 # Always uses the latest patch version. |
23 | 23 | only-new-issues: true # Show only new issues if it's a pull request |
24 | 24 |
|
25 | | - testdata: |
26 | | - name: Verify testdata directory |
27 | | - needs: lint |
28 | | - runs-on: ubuntu-latest |
29 | | - # Pull requests from the same repository won't trigger this checks as they were already triggered by the push |
30 | | - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
31 | | - steps: |
32 | | - - name: Clone the code |
33 | | - uses: actions/checkout@v2 |
34 | | - - name: Setup Go |
35 | | - uses: actions/setup-go@v2 |
36 | | - with: |
37 | | - go-version: '1.15' |
38 | | - # This step is needed as the following one tries to remove |
39 | | - # kustomize for each test but has no permission to do so |
40 | | - - name: Remove pre-installed kustomize |
41 | | - run: sudo rm -f /usr/local/bin/kustomize |
42 | | - - name: Verify testdata directory |
43 | | - run: make check-testdata |
44 | | - |
45 | 25 | test: |
46 | 26 | name: Test for ${{ matrix.os }} |
47 | 27 | needs: lint |
|
68 | 48 | coverage: |
69 | 49 | name: Code coverage |
70 | 50 | needs: |
71 | | - - lint |
72 | | - - testdata |
73 | 51 | - test |
74 | 52 | runs-on: ubuntu-latest |
75 | 53 | # Pull requests from the same repository won't trigger this checks as they were already triggered by the push |
|
87 | 65 | uses: shogo82148/actions-goveralls@v1 |
88 | 66 | with: |
89 | 67 | path-to-profile: coverage-all.out |
| 68 | + |
| 69 | + testdata: |
| 70 | + name: Verify testdata directory |
| 71 | + needs: lint |
| 72 | + runs-on: ubuntu-latest |
| 73 | + # Pull requests from the same repository won't trigger this checks as they were already triggered by the push |
| 74 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 75 | + steps: |
| 76 | + - name: Clone the code |
| 77 | + uses: actions/checkout@v2 |
| 78 | + - name: Setup Go |
| 79 | + uses: actions/setup-go@v2 |
| 80 | + with: |
| 81 | + go-version: '1.15' |
| 82 | + # This step is needed as the following one tries to remove |
| 83 | + # kustomize for each test but has no permission to do so |
| 84 | + - name: Remove pre-installed kustomize |
| 85 | + run: sudo rm -f /usr/local/bin/kustomize |
| 86 | + - name: Verify testdata directory |
| 87 | + run: make check-testdata |
| 88 | + |
| 89 | + debug: |
| 90 | + name: Debug failing workflows |
| 91 | + needs: # Add to this list every job in this workflow |
| 92 | + - lint |
| 93 | + - test |
| 94 | + - coverage |
| 95 | + - testdata |
| 96 | + runs-on: ubuntu-latest |
| 97 | + # Failed PRs are shown in their check but pushes are hard to notice so we create an issue |
| 98 | + if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 99 | + steps: |
| 100 | + - name: Print env and event |
| 101 | + |
| 102 | + - name: Create issue |
| 103 | + uses: nashmaniac/[email protected] |
| 104 | + with: |
| 105 | + title: CI failed for ${{ github.sha }} |
| 106 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 107 | + labels: kind/bug |
| 108 | + body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
0 commit comments