Check out repo outside of reusable actions

Max Brunsfeld , Mikayla , and Kirill created

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>

Change summary

.github/actions/check_formatting/action.yml | 10 ++--------
.github/actions/run_tests/action.yml        |  6 ------
.github/workflows/ci.yml                    | 14 +++++++++++++-
.github/workflows/release_nightly.yml       | 14 +++++++++++++-
4 files changed, 28 insertions(+), 16 deletions(-)

Detailed changes

.github/actions/rust_fmt/action.yml → .github/actions/check_formatting/action.yml 🔗

@@ -1,5 +1,5 @@
-name: 'Run rustfmt'
-description: 'Runs rustfmt'
+name: 'Check formatting'
+description: 'Checks code formatting use cargo fmt'
 
 runs:
   using: "composite"
@@ -10,12 +10,6 @@ runs:
         rustup set profile minimal
         rustup update stable
 
-    - name: Checkout repo
-      uses: actions/checkout@v3
-      with:
-        clean: false
-        submodules: "recursive"
-
     - name: cargo fmt
       shell: bash -euxo pipefail {0}
       run: cargo fmt --all -- --check

.github/actions/run_tests/action.yml 🔗

@@ -17,12 +17,6 @@ runs:
       with:
         node-version: "18"
 
-    - name: Checkout repo
-      uses: actions/checkout@v3
-      with:
-        clean: false
-        submodules: "recursive"
-
     - name: Limit target directory size
       shell: bash -euxo pipefail {0}
       run: script/clear-target-dir-if-larger-than 70

.github/workflows/ci.yml 🔗

@@ -23,8 +23,14 @@ jobs:
       - self-hosted
       - test
     steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+        with:
+          clean: false
+          submodules: "recursive"
+
       - name: Run rustfmt
-        uses: ./.github/actions/rust_fmt
+        uses: ./.github/actions/check_formatting
 
   tests:
     name: Run tests
@@ -33,6 +39,12 @@ jobs:
       - test
     needs: rustfmt
     steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+        with:
+          clean: false
+          submodules: "recursive"
+
       - name: Run tests
         uses: ./.github/actions/run_tests
 

.github/workflows/release_nightly.yml 🔗

@@ -20,8 +20,14 @@ jobs:
       - self-hosted
       - test
     steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+        with:
+          clean: false
+          submodules: "recursive"
+
       - name: Run rustfmt
-        uses: ./.github/actions/rust_fmt
+        uses: ./.github/actions/check_formatting
 
   tests:
     name: Run tests
@@ -30,6 +36,12 @@ jobs:
       - test
     needs: rustfmt
     steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+        with:
+          clean: false
+          submodules: "recursive"
+
       - name: Run tests
         uses: ./.github/actions/run_tests