Skip to content

Commit

Permalink
Merge pull request #10 from MinoruSekine/chore/9/split_lint_workflow
Browse files Browse the repository at this point in the history
chore: Split lint into independent job for maintainability. (#9)
  • Loading branch information
MinoruSekine authored Dec 27, 2024
2 parents d2c4ce4 + 8834bdd commit f11d816
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 72 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/ci.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
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
47 changes: 47 additions & 0 deletions .github/workflows/run.yml
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"

0 comments on commit f11d816

Please sign in to comment.