-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from MinoruSekine/chore/9/split_lint_workflow
chore: Split lint into independent job for maintainability. (#9)
- Loading branch information
Showing
3 changed files
with
79 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
schedule: | ||
- cron: 0 20 * * 6 | ||
workflow_dispatch: | ||
|
||
env: | ||
packages_to_install: shellcheck | ||
|
||
jobs: | ||
shellcheck: | ||
name: shellcheck | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install supplementals | ||
shell: bash | ||
run: | | ||
sudo apt update | ||
sudo apt install --no-install-recommends ${{ env.packages_to_install }} | ||
- name: Lint | ||
shell: bash | ||
run: make -k -j lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
schedule: | ||
- cron: 0 20 * * 6 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
InstallAndRun: | ||
name: Install and run | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
shell: bash | ||
run: | | ||
sudo make -k -j install | ||
hash -r | ||
- name: Help | ||
shell: bash | ||
run: allgitstatus.sh | ||
|
||
- name: Run without variables | ||
shell: bash | ||
run: allgitstatus.sh ./ | ||
|
||
- name: Run with specifying parameters for "git status" | ||
shell: bash | ||
run: GIT_STATUS_PARAMETERS="-s" allgitstatus.sh ./ | ||
|
||
- name: Test the message if no repositories are found | ||
shell: bash | ||
run: | | ||
mkdir dir_without_no_git_repositories | ||
allgitstatus.sh dir_without_no_git_repositories | grep -i "no git repositories are found" |