Skip to content

Commit 3b8f9f7

Browse files
Setup ci and config (#4)
* First attempt at CI * Change ci image to Alpine and change nu setup to use `apk` * Add tags * switch to ubuntu for shorter waiting times * Add nu repo to package list during install * typo fix * iNSTALL FROM BINARIES * Pin ubuntu version and remove line installing jq
1 parent f911f1f commit 3b8f9f7

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,21 @@ on:
1313

1414
jobs:
1515
verify_exercises:
16-
# TODO: replace with another image if required to run the tests (optional)
16+
# apk has an old nu version, so alpine is used to ensure compatibility
1717
runs-on: ubuntu-24.04
1818

1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
2222

23-
# TODO: setup any tooling that is required to run the tests (optional)
24-
# E.g. install a specific version of a programming language
25-
# E.g. install packages via apt/apk/yum/etc.
26-
# Find GitHub Actions to setup tooling here:
27-
# - https://github.com/actions/?q=setup&type=&language=
28-
# - https://github.com/actions/starter-workflows/tree/main/ci
29-
# - https://github.com/marketplace?type=actions&query=setup
30-
# - name: Use <setup tooling>
31-
# uses: <action to setup tooling>
23+
- name: Use nushell
24+
run: |
25+
curl -L -o nu.tar.gz https://github.com/nushell/nushell/releases/download/0.104.1/nu-0.104.1-x86_64-unknown-linux-gnu.tar.gz && \
26+
tar -xzf nu.tar.gz && \
27+
sudo mv nu-0.104.1-x86_64-unknown-linux-gnu/* /usr/bin/ && \
28+
rm nu.tar.gz && \
29+
rm -r nu-0.104.1-x86_64-unknown-linux-gnu
3230
33-
# TODO: install any dependencies (optional)
34-
# E.g. npm install, bundle install, etc.
35-
# - name: Install project dependencies
36-
# run: <install dependencies>
3731
3832
- name: Verify all exercises
3933
run: bin/verify-exercises

bin/verify-exercises

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ unskip_tests() {
4242
}
4343

4444
run_tests() {
45-
noop # TODO: replace this with the command to run the tests for the exercise.
45+
nu tests.nu
4646
# Note: this function runs from within an exercise directory.
4747
# Note: the exercise directory is a temporary directory, so feel
4848
# free to modify its files as needed.
@@ -68,7 +68,7 @@ verify_exercise() {
6868
cd "${tmp_dir}"
6969

7070
copy_example_or_examplar_to_solution
71-
unskip_tests
71+
# unskip_tests # Nushell currently does not support skipping tests
7272
run_tests
7373
)
7474
}

config.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"representer": false,
99
"analyzer": false
1010
},
11-
"blurb": "TODO: add blurb",
11+
"blurb": "Nushell is a modern shell oriented around structured data and pipelines.",
1212
"version": 3,
1313
"online_editor": {
1414
"indent_style": "space",
1515
"indent_size": 4
1616
},
1717
"files": {
18-
"solution": [],
19-
"test": [],
20-
"example": [],
21-
"exemplar": []
18+
"solution": ["%{kebab_slug}.nu"],
19+
"test": ["tests.nu"],
20+
"example": [".meta/example.nu"],
21+
"exemplar": [".meta/exemplar.nu"]
2222
},
2323
"exercises": {
2424
"concept": [],
@@ -35,5 +35,14 @@
3535
},
3636
"concepts": [],
3737
"key_features": [],
38-
"tags": []
38+
"tags": [
39+
"paradigm/functional",
40+
"typing/static",
41+
"platform/windows",
42+
"platform/mac",
43+
"platform/linux",
44+
"platform/android",
45+
"runtime/language_specific",
46+
"used_for/scripts"
47+
]
3948
}

0 commit comments

Comments
 (0)