Skip to content

Commit

Permalink
test(gha): run bats tests on Darwin/arm64 and Linux/x64 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
looztra authored Aug 23, 2024
1 parent 012ead9 commit 813bab0
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
with:
command: gitui --version

- name: Checkout code
uses: actions/checkout@v4

- name: Install Tools with asdf
uses: asdf-vm/actions/install@v3

- name: Test plugin with bats
run: |
asdf plugin-add gitui "${GITHUB_WORKSPACE}"
bats --filter-tags type:features test
lint_and_tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -47,7 +58,6 @@ jobs:
run: |
pre-commit run --all-files
- name: Test plugin with bats
- name: Test code with bats
run: |
asdf plugin-add gitui "${GITHUB_WORKSPACE}"
bats test
bats --filter-tags type:code test
25 changes: 24 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
{
"cloudcode.yaml.format.singleQuote": true,
"yaml.format.singleQuote": true
"yaml.format.singleQuote": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#91f339",
"activityBar.background": "#91f339",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#4b9bf4",
"activityBarBadge.foreground": "#15202b",
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#91f339",
"statusBar.background": "#76eb0e",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#5ebb0b",
"statusBarItem.remoteBackground": "#76eb0e",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#76eb0e",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#76eb0e99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#76eb0e",
"cSpell.words": [
"POSIX"
]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
## Dependencies

- `bash`, `curl`, and [POSIX utilities](https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html).
- a python 3 runtime (provided through [asdf-python](https://github.com/asdf-community/asdf-python) or not)

## Install

Expand Down
9 changes: 6 additions & 3 deletions test/default.bats
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
#!/usr/bin/env bats
# shellcheck disable=SC2034
BATS_TEST_FILENAME_BASENAME=$(basename "${BATS_TEST_FILENAME}")
# bats file_tags=type:features

@test "can list all" {
asdf list all gitui
}

@test "can install latest" {
@test "can install latest [${BATS_TEST_FILENAME_BASENAME}]" {
asdf install gitui latest
}

@test "can install 0.25.2" {
@test "can install 0.25.2 [${BATS_TEST_FILENAME_BASENAME}]" {
asdf install gitui 0.25.2
asdf list gitui
}

@test "can install 0.26.2" {
@test "can install 0.26.2 [${BATS_TEST_FILENAME_BASENAME}]" {
asdf install gitui 0.26.2
asdf list gitui
}

0 comments on commit 813bab0

Please sign in to comment.