From 2ac26e7e14915df141782687460556a0aa548d96 Mon Sep 17 00:00:00 2001 From: marcelloromani Date: Sun, 6 Nov 2022 11:32:03 +0000 Subject: [PATCH 1/5] yaml linting for github actions --- .github/.yamllint.yaml | 15 +++++++++++++++ .github/workflows/gh_action_lint.yaml | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/.yamllint.yaml create mode 100644 .github/workflows/gh_action_lint.yaml diff --git a/.github/.yamllint.yaml b/.github/.yamllint.yaml new file mode 100644 index 0000000..8d5386a --- /dev/null +++ b/.github/.yamllint.yaml @@ -0,0 +1,15 @@ +extends: default + +ignore: | + .git/** +rules: + braces: + level: error + max-spaces-inside: 1 + brackets: + level: error + max-spaces-inside: 1 + document-start: disable + line-length: disable + new-line-at-end-of-file: enable + trailing-spaces: enable diff --git a/.github/workflows/gh_action_lint.yaml b/.github/workflows/gh_action_lint.yaml new file mode 100644 index 0000000..fcac680 --- /dev/null +++ b/.github/workflows/gh_action_lint.yaml @@ -0,0 +1,17 @@ +name: YAML Lint + +on: # yamllint disable-line rule:truthy + push + +jobs: + yamllint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: YAML Lint github actions + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: .github + config_file: .github/.yamllint.yaml From 6eca1ad4371eb4cab36cb54da3643d35427ffc19 Mon Sep 17 00:00:00 2001 From: Marcello Romani Date: Mon, 7 Nov 2022 13:18:03 +0000 Subject: [PATCH 2/5] fix yaml lint errors --- .github/workflows/build.yml | 14 ++++++------ .github/workflows/gh_action_lint.yaml | 2 +- .github/workflows/github_pages_deploy.yml | 26 +++++++++++------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9911d8..e02128c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,15 +1,15 @@ name: Builds the website (doesn't deploy - only used for checking syntax) -on: +on: # yamllint disable-line rule:truthy push jobs: build-deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Install the tutorial_web binary - run: /usr/bin/env python3 install.py linux - # Build the website - - name: Build - run: ./bin/tutorial_web build -i courses -s ./bin/static -o build -b /tutorial_web_content + - uses: actions/checkout@master + - name: Install the tutorial_web binary + run: /usr/bin/env python3 install.py linux + # Build the website + - name: Build + run: ./bin/tutorial_web build -i courses -s ./bin/static -o build -b /tutorial_web_content diff --git a/.github/workflows/gh_action_lint.yaml b/.github/workflows/gh_action_lint.yaml index fcac680..16b9a06 100644 --- a/.github/workflows/gh_action_lint.yaml +++ b/.github/workflows/gh_action_lint.yaml @@ -1,6 +1,6 @@ name: YAML Lint -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy push jobs: diff --git a/.github/workflows/github_pages_deploy.yml b/.github/workflows/github_pages_deploy.yml index 60fa61b..2d0560d 100644 --- a/.github/workflows/github_pages_deploy.yml +++ b/.github/workflows/github_pages_deploy.yml @@ -1,22 +1,22 @@ name: Deploy to GH pages -on: +on: # yamllint disable-line rule:truthy push: branches: - - master + - master jobs: build-deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Install the tutorial_web binary - run: /usr/bin/env python3 install.py linux - # Build the website - - name: Build - run: ./bin/tutorial_web build -i courses -s ./bin/static -o build -b /tutorial_web_content - - name: Deploy - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: build + - uses: actions/checkout@master + - name: Install the tutorial_web binary + run: /usr/bin/env python3 install.py linux + # Build the website + - name: Build + run: ./bin/tutorial_web build -i courses -s ./bin/static -o build -b /tutorial_web_content + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: build From 643003e9607af6a910a2e75f6076305930c0faf4 Mon Sep 17 00:00:00 2001 From: marcelloromani Date: Mon, 7 Nov 2022 18:31:38 +0000 Subject: [PATCH 3/5] rename workflow for consistency --- .github/workflows/{gh_action_lint.yaml => yaml_lint.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{gh_action_lint.yaml => yaml_lint.yaml} (100%) diff --git a/.github/workflows/gh_action_lint.yaml b/.github/workflows/yaml_lint.yaml similarity index 100% rename from .github/workflows/gh_action_lint.yaml rename to .github/workflows/yaml_lint.yaml From 8292316fa8b1e04dc3d610203aae0f84bcfe2714 Mon Sep 17 00:00:00 2001 From: marcelloromani Date: Mon, 7 Nov 2022 18:44:54 +0000 Subject: [PATCH 4/5] YAML lint the whole repo --- .github/workflows/yaml_lint.yaml | 6 +++--- .github/.yamllint.yaml => .yamllint.yaml | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/.yamllint.yaml => .yamllint.yaml (100%) diff --git a/.github/workflows/yaml_lint.yaml b/.github/workflows/yaml_lint.yaml index 16b9a06..a3cea23 100644 --- a/.github/workflows/yaml_lint.yaml +++ b/.github/workflows/yaml_lint.yaml @@ -10,8 +10,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: YAML Lint github actions + - name: YAML Lint uses: ibiqlik/action-yamllint@v3 with: - file_or_dir: .github - config_file: .github/.yamllint.yaml + file_or_dir: . + config_file: .yamllint.yaml diff --git a/.github/.yamllint.yaml b/.yamllint.yaml similarity index 100% rename from .github/.yamllint.yaml rename to .yamllint.yaml From 19507acf3f96c8d8d31865b312964b984fcdda6f Mon Sep 17 00:00:00 2001 From: marcelloromani Date: Mon, 7 Nov 2022 18:48:07 +0000 Subject: [PATCH 5/5] fix YAML lint issues --- courses/scratch/ghostcatcher.yml | 10 +++++----- courses/web/cookie_clicker.yml | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/courses/scratch/ghostcatcher.yml b/courses/scratch/ghostcatcher.yml index 8f64449..33960cb 100644 --- a/courses/scratch/ghostcatcher.yml +++ b/courses/scratch/ghostcatcher.yml @@ -49,8 +49,8 @@ tutorials: Click on the Paint Tool, select a color you like and click on the checkered area to paint it. ![](assets/color_selector_paint_tool.png) - - Feel free to experiment with the other tools, but don't make it too crowded just yet! + + Feel free to experiment with the other tools, but don't make it too crowded just yet! You can come back later and improve the background, or select a completely new one. - subtitle: Drawing Pacman @@ -115,7 +115,7 @@ tutorials: content: | Let's go to the "Code" tab and start animating Pacman! Click on the "Events" section on the left and find the block labelled - `When [green flag] pressed`. Click and drag the block from the left + `When [green flag] pressed`. Click and drag the block from the left onto the right hand screen. ![](assets/pacman_green_flag.png) @@ -165,7 +165,7 @@ tutorials: ![](assets/no_outline.png) Let's draw a circle and a square on top of it. - + ![](assets/circle_and_square_for_ghost.png) You can draw the ghost's legs by erasing two triangles from the bottom @@ -188,7 +188,7 @@ tutorials: Feel free to come to this section later if you want to go straight to continuing with the game. Let's make an animated ghost just like we did for pacman. - + Duplicate the costume ghost. Click on the black ovan inside the eye. diff --git a/courses/web/cookie_clicker.yml b/courses/web/cookie_clicker.yml index e5d41fd..5247a14 100644 --- a/courses/web/cookie_clicker.yml +++ b/courses/web/cookie_clicker.yml @@ -64,7 +64,7 @@ tutorials: ## Tasks - Have a look at the line in the HTML that says: + Have a look at the line in the HTML that says: ```html ``` @@ -314,4 +314,3 @@ tutorials: - It would be nice to see how many factories/chefs/bakeries you have purchased and how many they produce per second. - Upgrades. You could create purchasable upgrades to improve the productivity of your cookie production. -