generated from skills/test-with-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from highschool-coder/ci
Ci
- Loading branch information
Showing
3 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4 | ||
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run markdown lint | ||
run: | | ||
npm install remark-cli remark-preset-lint-consistent vfile-reporter-json | ||
npx remark . --use remark-preset-lint-consistent --report vfile-reporter-json 2> remark-lint-report.json | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: remark-lint-report | ||
path: remark-lint-report.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
|
||
|
||
<!-- | ||
<<< Author notes: Step 4 >>> | ||
<<< Author notes: Step 5 >>> | ||
Start this step by acknowledging the previous step. | ||
Define terms and link to docs.github.com. | ||
--> | ||
|
||
## Step 4: Add branch protections | ||
## Step 5: Merge your pull request | ||
|
||
_Great job uploading test reports! :partying_face:_ | ||
_Almost there! :heart:_ | ||
|
||
Take a look at the merge box, you'll notice you can merge this even though the review process hasn't been met. | ||
You can now [merge](https://docs.github.com/get-started/quickstart/github-glossary#merge) your pull request! | ||
|
||
Protected branches ensure that collaborators on your repository cannot make irrevocable changes to branches. Enabling protected branches also allows you to enable other optional checks and requirements, like required status checks and required reviews. | ||
### :keyboard: Activity: Merge your pull request | ||
|
||
### :keyboard: Activity: Add branch protections | ||
|
||
1. Go to **Branches** settings. You can navigate to that page manually by selecting the right-most tab in the top of the repository called **Settings** and then clicking **Branches**. | ||
1. Click **Add classic branch protection rule** under "Branch protection rules". | ||
1. Type `main` in **Branch name pattern**. | ||
1. Check **Require a pull request before merging**. | ||
1. Uncheck **Require approvals**. | ||
1. Check **Require status checks to pass before merging**. | ||
1. Check all build and test jobs that you'd like to see in the newly visible gray box. | ||
1. Click **Create**. | ||
1. _Once you turn on branch protection, Actions can no longer push directly to the `main` branch. Wait about 20 seconds and then go to the `ci` branch. [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step on the `ci` branch. You'll need to follow instructions on this branch._ | ||
1. Go to the **Pull requests** tab. | ||
1. Click **Merge pull request**. | ||
1. _Once you turn on branch protection, Actions can no longer push directly to the `main` branch. Make sure that you're on the `ci` branch in the page you're following instructions from._ Wait about 20 seconds and then refresh the page. [GitHub Actions](https://docs.github.com/actions) will automatically update to the next step. | ||
|
||
|