You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -118,8 +115,6 @@ Once you push your changes, GitHub will automatically trigger the workflow.
118
115
119
116
3. Install dependencies – Runs npm ci to install dependencies.
120
117
121
-
4. Install biome – Installs @biomejs/cli-linux-x64 to avoid issues in GitHub Actions.
122
-
123
118
</details>
124
119
125
120
## 🚀 Using Artifacts and Cache in GitHub Actions
@@ -131,7 +126,7 @@ In GitHub Actions, artifacts and cache serve similar purposes as in GitLab CI:
131
126
132
127
🔗 Refer to the [GitHub Actions documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-and-builds) on caching and artifacts for more details.
133
128
134
-
### 🏋️ Exercise
129
+
### 📝 Exercise
135
130
136
131
1. Enhance the `install` job to include artifacts and cache configurations:
137
132
@@ -213,10 +208,8 @@ By adding a **lint job** in the pipeline, we ensure that all code adheres to bes
213
208
Enhance the workflow by:
214
209
215
210
1. Creating a new stage called **check**.
216
-
2. Adding a **lint job** that runs `npm run lint`.
217
-
3. Reusing `node_modules/` from the **install** job using GitHub Actions cache & artifacts.
218
-
4. Making **lint** depend on **install**, ensuring dependencies are installed first.
219
-
5. Commit your updated workflow
211
+
2. Adding a **lint job** that runs `biome ci` using the [Setup Biome GitHub Action](https://github.com/marketplace/actions/setup-biome).
212
+
3. Commit your updated workflow
220
213
- Push your changes to trigger the GitHub Actions workflow.
221
214
- Verify that the **lint job** runs successfully in the **Actions** tab. 🚀
222
215
@@ -226,81 +219,145 @@ Enhance the workflow by:
226
219
<summary>Expand</summary>
227
220
228
221
```yaml
229
-
name: CI Pipeline
222
+
lint:
223
+
runs-on: ubuntu-latest
224
+
needs: install # Ensures the install job completes first
225
+
steps:
226
+
- name: Checkout repository
227
+
uses: actions/checkout@v4
228
+
229
+
- name: Setup Biome CLI
230
+
uses: biomejs/setup-biome@v2 # The action will look for the version of the @biomejs/biome dependency in the lockfiles of popular package managers such as npm.
231
+
232
+
- name: Run Biome
233
+
run: biome ci # Files won’t be modified, the command is a read-only operation.
0 commit comments