From 90527dd990130c2cba47391d9d88588d983ac3e8 Mon Sep 17 00:00:00 2001 From: craftscat Date: Tue, 19 Mar 2024 18:28:49 +0900 Subject: [PATCH] Add workflows --- .github/workflows/init-test.yml | 26 ++++++++++++++++++++++++++ .github/workflows/lint.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/init-test.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/init-test.yml b/.github/workflows/init-test.yml new file mode 100644 index 0000000..1a1d5c4 --- /dev/null +++ b/.github/workflows/init-test.yml @@ -0,0 +1,26 @@ +name: "init script test" +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Show dotfiles + run: make list + - name: Install dotfiles + run: make install + - name: Install Homebrew & setup (macOS ONLY) + if: runner.os == 'macOS' + run: make macos + - name: Self-documented Makefile + run: make help diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..df739fd --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: lint +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check the setup scripts + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-check + path: "." + pattern: "*.sh" + - name: Check the scripts in '~/bin' + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-check + path: "./bin/" + pattern: "*"