Skip to content

Commit

Permalink
CI: update code checkout step
Browse files Browse the repository at this point in the history
`fetch-depth: 0` means that that all history for all branches and tags
should be fetch which is completely unnecessary.
  • Loading branch information
Techatrix committed Feb 13, 2024
1 parent 55c7a18 commit 4218a4a
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 174 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".github/workflows/build_runner.yml"
- "src/build_runner/**"
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
Expand All @@ -27,9 +27,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
uses: actions/checkout@v4

- name: Grab zig
uses: goto-bus-stop/setup-zig@v2
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: actions/checkout@v4

- uses: goto-bus-stop/setup-zig@v2
with:
Expand All @@ -30,12 +27,11 @@ jobs:
run: |
kcov --version
zig build test -Dgenerate_coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: zig-out/kcov/kcov-merged
fail_ci_if_error: true
verbose: true

15 changes: 4 additions & 11 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,22 @@ jobs:
- run: zig env

- name: Checkout zig
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: zig
repository: "ziglang/zig"
fetch-depth: 0

- name: Checkout zls (non-PR)
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: zls
fetch-depth: 0

- name: Checkout zls (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: zls
fetch-depth: 0
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Build zls
Expand All @@ -83,11 +80,10 @@ jobs:
zig build
- name: Checkout sus
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: sus
repository: "zigtools/sus"
fetch-depth: 0

- name: Build sus
run: |
Expand Down Expand Up @@ -117,6 +113,3 @@ jobs:
space_region: nyc3
source: sus/saved_logs/
out_dir: ${{ github.event.pull_request.head.repo.full_name || github.repository }}/${{ github.head_ref || github.ref_name }}/${{ github.event.pull_request.head.sha || github.sha }}



Loading

0 comments on commit 4218a4a

Please sign in to comment.