Skip to content

Commit 0134264

Browse files
committed
Merge branch 'main' into fix-test-doubles
2 parents 613c242 + 0f8c3e5 commit 0134264

154 files changed

Lines changed: 5724 additions & 1282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ indent_size = 2
2626
[{Makefile,**.mk,.git*}]
2727
indent_style = tab
2828

29-
[{tests/acceptance/**.sh,src/console_header.sh}]
29+
[{tests/acceptance/**.sh,src/console_header.sh,docs/command-line.md}]
3030
indent_size = unset

.env.example

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
SHOW_HEADER=
2-
HEADER_ASCII_ART=
3-
SIMPLE_OUTPUT=
4-
STOP_ON_FAILURE=
5-
SHOW_EXECUTION_TIME=
6-
DEFAULT_PATH=
1+
BASHUNIT_DEFAULT_PATH=
2+
BASHUNIT_DEV_LOG=
3+
BASHUNIT_BOOTSTRAP=
4+
BASHUNIT_LOG_JUNIT=
5+
BASHUNIT_REPORT_HTML=
6+
7+
# Booleans
8+
BASHUNIT_PARALLEL_RUN=
9+
BASHUNIT_SHOW_HEADER=
10+
BASHUNIT_HEADER_ASCII_ART=
11+
BASHUNIT_SIMPLE_OUTPUT=
12+
BASHUNIT_STOP_ON_FAILURE=
13+
BASHUNIT_SHOW_EXECUTION_TIME=
14+
BASHUNIT_DEV_MODE=

.github/CONTRIBUTING.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,33 @@ this will require to have installed [fswatcher](https://github.com/emcrisostomo/
6767
make test/watch
6868
```
6969

70+
### Testing different OS
71+
72+
- Linux
73+
- Ubuntu latest
74+
- Alpine latest
75+
- Windows latest
76+
- MacOS latest
77+
78+
#### Docker
79+
80+
##### Ubuntu latest
81+
82+
```bash
83+
docker run --rm -it -v "$(pwd)":/project -w /project ubuntu:latest \
84+
sh -c "apt-get update && \
85+
apt-get install -y bash make shellcheck git curl perl && make test"
86+
```
87+
88+
##### Alpine latest
89+
90+
```bash
91+
make test/alpine
92+
# or
93+
docker run --rm -it -v "$(pwd)":/project -w /project alpine:latest \
94+
sh -c "apk add bash make shellcheck git && make test"
95+
```
96+
7097
## Coding Guidelines
7198

7299
### ShellCheck
@@ -116,7 +143,8 @@ make pre_commit/install
116143
[Shell Guide](https://google.github.io/styleguide/shellguide.html#s7.2-variable-names) by Google Conventions.
117144

118145
### Documentation
119-
For us the documentation its really important, we are a small group and we want to mantain this project for long, to do that we will need your help
146+
147+
For us the documentation it's really important, we are a small group, and we want to maintain this project for long, to do that we will need your help.
120148

121149
## ADR
122150
If you want to change something related to the architecture or apply a change that it's a decision on how the library works please use [ADR](https://adr.github.io/) otherwise we will request you to do so on the PR.

.github/RELEASE.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
This is a guide to know the steps to create a new release.
44

55
1. Update the version in [BASHUNIT_VERSION](../bashunit)
6-
2. Update the version in [LATEST_BASHUNIT_VERSION](../install.sh)
7-
3. Update the version in [CHANGELOG.md](../CHANGELOG.md)
8-
4. Update the version in [package.json](../package.json)
9-
5. Create a [new release](https://github.com/TypedDevs/bashunit/releases/new) from GitHub
10-
6. Attach the latest executable to the release
11-
1. Generate a new bashunit with `build.sh`
12-
2. Attach the generated file to the release page on GitHub
13-
3. Keep the name `bashunit`
14-
7. Commit and push
15-
8. Rebase `latest` branch from the new created tag and push
6+
1. Update the version in [LATEST_BASHUNIT_VERSION](../install.sh)
7+
1. Update the version in [CHANGELOG.md](../CHANGELOG.md)
8+
1. Update the version in [package.json](../package.json)
9+
1. Build the project `./build.sh bin`
10+
1. This will generate `bin/bashunit` and `bin/checksum`
11+
1. Update the checksum(sha256) in [package.json](../package.json)
12+
1. Create a [new release](https://github.com/TypedDevs/bashunit/releases/new) from GitHub
13+
1. Attach the latest executable and checksum to the release
14+
1. `bin/bashunit`
15+
1. `bin/checksum`
16+
1. Keep the same name
17+
1. Commit and push
18+
1. Rebase `latest` branch from the newly created tag and push
1619
1. This will trigger "build and deploy" the docs

.github/workflows/check-docs.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ name: Check Docs
22

33
on:
44
pull_request:
5+
push:
6+
branches:
7+
- main
58

69
workflow_dispatch:
710

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
1311
concurrency:
1412
group: pages
1513
cancel-in-progress: false
@@ -19,19 +17,18 @@ jobs:
1917
runs-on: ubuntu-latest
2018
steps:
2119
- name: Checkout
22-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2321
with:
2422
fetch-depth: 0
23+
2524
- name: Setup Node
26-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2726
with:
2827
node-version: 20
2928
cache: npm
30-
- name: Setup Pages
31-
uses: actions/configure-pages@v3
29+
3230
- name: Install dependencies
3331
run: npm ci
32+
3433
- name: Build with VitePress
35-
run: |
36-
npm run docs:build
37-
touch docs/.vitepress/dist/.nojekyll
34+
run: npm run docs:build

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/linter.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1+
name: Editorconfig Linter
2+
13
on:
24
pull_request:
35
push:
46
branches:
57
- main
68

7-
name: Editorconfig Linter
8-
99
jobs:
10-
11-
tests:
10+
linter:
1211
name: "Run Lint on ${{ matrix.os }}"
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
os: [ 'ubuntu-latest' ]
12+
runs-on: ubuntu-latest
1713
steps:
18-
- uses: actions/checkout@v3
19-
- uses: editorconfig-checker/action-editorconfig-checker@main
20-
- run: editorconfig-checker
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Editorconfig Linter
20+
uses: editorconfig-checker/action-editorconfig-checker@main
21+
22+
- name: Run Linter
23+
run: editorconfig-checker
2124

.github/workflows/publish-docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- latest
7+
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: pages
12+
cancel-in-progress: false
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
deployments: write
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: npm
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build with VitePress
36+
run: npm run docs:build
37+
38+
- name: Publish to Cloudflare Pages
39+
uses: cloudflare/pages-action@v1
40+
with:
41+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
43+
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
44+
directory: docs/.vitepress/dist
45+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/static_analysis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
1+
name: Static Analysis
22

33
on:
44
pull_request:
55
push:
66
branches:
77
- main
88

9-
name: Static analysis
10-
119
jobs:
12-
1310
shellcheck:
1411
name: ShellCheck
1512
runs-on: ${{ matrix.os }}
1613
strategy:
1714
matrix:
18-
os: [ 'ubuntu-latest', 'macos-latest' ]
15+
os:
16+
- ubuntu-latest
17+
- macos-latest
1918
steps:
20-
- uses: actions/checkout@v3
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
2124
- name: Run ShellCheck
2225
uses: ludeeus/action-shellcheck@master
2326
env:

0 commit comments

Comments
 (0)