Skip to content

Commit dcd2e86

Browse files
Add linter CI to profile script (#693)
* Add macOS compatibility for DAppNode profile and improve alias handling * Add shell compatibility checks for .dappnode_profile in CI workflow * Update actions/checkout to v6 in linter workflow
1 parent bcc05b2 commit dcd2e86

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/linter.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout Code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525
with:
2626
# Full git history is needed to get a proper list of changed files within `super-linter`
2727
fetch-depth: 0
@@ -33,3 +33,33 @@ jobs:
3333
FILTER_REGEX_EXCLUDE: .github/*
3434
DEFAULT_BRANCH: master
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
37+
shell-compat:
38+
name: Shell compatibility (.dappnode_profile)
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
os: [ubuntu-latest, macos-latest]
44+
45+
steps:
46+
- name: Checkout Code
47+
uses: actions/checkout@v6
48+
49+
- name: Install zsh (Ubuntu)
50+
if: runner.os == 'Linux'
51+
run: |
52+
sudo apt-get update
53+
sudo apt-get install -y zsh
54+
55+
- name: Parse check (bash)
56+
run: bash -n .dappnode_profile
57+
58+
- name: Parse check (zsh)
59+
run: zsh -n .dappnode_profile
60+
61+
- name: Source check (bash)
62+
run: bash -lc 'set -euo pipefail; source ./.dappnode_profile'
63+
64+
- name: Source check (zsh)
65+
run: zsh -lc 'set -e; source ./.dappnode_profile; alias dappnode_status >/dev/null'

0 commit comments

Comments
 (0)