Skip to content

Commit

Permalink
#25: PoC for multi-platform leia tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Aug 13, 2021
1 parent 5492927 commit 1aaea64
Show file tree
Hide file tree
Showing 5 changed files with 315 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pr-basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version:
- '14'
leia-tests:
- basics
- basics-example
steps:

# Install deps and cache
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
hyperdrive version
# This block should eventually become use lando/actions-leia@v2
# - name: Generate tests
# run: yarn generate:tests
# - name: Run ${{ matrix.leia-tests }} tests
# run: yarn mocha --timeout 900000 ./test/${{ matrix.leia-tests }}.func.js
- name: Generate tests
run: yarn generate:leia-tests
- name: Run ${{ matrix.leia-tests }} leia tests
run: yarn mocha --timeout 900000 ./test/${{ matrix.leia-tests }}.func.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ test/split-file.txt
test/*.func.js
.nyc_output
coverage/
test/leia
34 changes: 34 additions & 0 deletions examples/basics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Basics Example
==============

This example exists primarily to test the following documentation:

**Basics**

**CLI**

Start up tests
--------------

```bash
# Should print the version
hyperdrive version
```

Verification commands
---------------------

Run the following commands to verify things work as expected

```bash
# Should print the version
hyperdrive version
```

Destroy tests
-------------

```bash
# Should print the version
hyperdrive version
```
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"eslint": "^5.13",
"eslint-config-oclif": "^3.1",
"globby": "^10",
"leia-parser": "^0.4.0",
"mocha": "^5",
"nyc": "^14",
"pkg": "^5.3.1",
Expand Down Expand Up @@ -60,6 +61,7 @@
"scripts": {
"build": "yarn clean && yarn pkg -c package.json -t node14 bin/hyperdrive",
"clean": "rimraf dist",
"generate:leia-tests": "leia \"examples/**/README.md\" test/leia -r 2 -s 'Start up tests' -t 'Verification commands' -c 'Destroy tests' --split-file --spawn --stdin",
"lint": "eslint .",
"test": "nyc mocha --forbid-only \"test/**/*.test.js\""
}
Expand Down
Loading

0 comments on commit 1aaea64

Please sign in to comment.