Skip to content

Commit

Permalink
Add minimalist challenge check flows
Browse files Browse the repository at this point in the history
  • Loading branch information
heubeck committed Jun 28, 2023
1 parent e30199e commit 4929db3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/verify-java-minimalist-challenge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "Verify #3 Java Minimalist"
"on":
push:
paths:
- '3_Java_Minimalist/**'

jobs:
verify_challenge:
name: "Verify #3 Java Minimalist"
runs-on: ubuntu-latest
steps:
- name: 📦 Checkout
uses: actions/checkout@v3

- name: Check Spec
uses: jbangdev/jbang-action@v0.106.1
with:
script: "3_Java_Minimalist/Spec.java"
17 changes: 17 additions & 0 deletions .github/workflows/verify-javascript-minimalist-challenge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "Verify #4 JavaScript Minimalist"
"on":
push:
paths:
- '4_JavaScript_Minimalist/**'

jobs:
verify_challenge:
name: "Verify #4 JavaScript Minimalist"
runs-on: ubuntu-latest
steps:
- name: 📦 Checkout
uses: actions/checkout@v3

- name: Check Spec
run: 4_JavaScript_Minimalist/run.sh
2 changes: 1 addition & 1 deletion 3_Java_Minimalist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The task is to sort the words of a given text by a defined weight:
## Implementation

Please implement your solution by only changing the [Challenge.java](Challenge.java) file.
For testing your solution to fulfill the spec, just run the `run.sh` script.
For testing your solution to fulfill the spec, just run the `run.sh` script after installing [jbang](https://www.jbang.dev/).

## Scoring

Expand Down
5 changes: 2 additions & 3 deletions 4_JavaScript_Minimalist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

The task is to sort the words of a given text by a defined weight:

* A 'word' is defined as the group of characters not separated by whitespace, dash- or apostrophe-separated characters (
like `dash-separated` or `Thomas's`) shall be considered as one word (dashes and apostrophes have no weight).
* A 'word' is defined as the group of characters not separated by whitespace, dash- or apostrophe-separated characters (like `dash-separated` or `Thomas's`) shall be considered as one word (dashes and apostrophes have no weight).
* The weight of a word is the sum of its characters ascii value (`aBc` = 98 + 66 + 99 = 263)
* Punctuation characters (`.`, `,`, `?`, `!` and so on) shall be ignored
* The words shall be sorted descending by their weight and outputted as distinct list as follows:
Expand All @@ -15,7 +14,7 @@ The task is to sort the words of a given text by a defined weight:
<light word>|<weight>
```

It is forbidden to use any third party dependencies. This is why no package management is given. Everything natively
It is disallowed to use any third party dependencies. This is why no package management is given. Everything natively
supported by the node version described in the [.nvmrc](.nvmrc) is allowed to use.

## Implementation
Expand Down

0 comments on commit 4929db3

Please sign in to comment.