mirror of
https://github.com/ludeeus/action-shellcheck.git
synced 2025-09-15 04:36:26 +02:00
Move action to composite (#31)
This commit is contained in:
15
.github/workflows/ShellCheck.yml
vendored
15
.github/workflows/ShellCheck.yml
vendored
@@ -1,15 +0,0 @@
|
||||
on: [push, pull_request]
|
||||
name: 'ShellCheck'
|
||||
jobs:
|
||||
shellcheck:
|
||||
name: ShellCheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
with:
|
||||
ignore: ignore
|
42
.github/workflows/additional_files.yml
vendored
Normal file
42
.github/workflows/additional_files.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: 'additional_files'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
additional_files:
|
||||
name: additional_files
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
additional_files: run finish discovery
|
||||
ignore: ignore
|
||||
scandir: testfiles
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/scandir/run"
|
||||
|
||||
if [[ ! "${{ steps.check.outputs.files }}" =~ testfiles/scandir/run ]];then
|
||||
echo "::error:: Expected file testfiles/scandir/run not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ ! "${{ steps.check.outputs.files }}" =~ testfiles/scandir/finish ]];then
|
||||
echo "::error:: Expected file testfiles/scandir/finish not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ ! "${{ steps.check.outputs.files }}" =~ testfiles/scandir/discovery ]];then
|
||||
echo "::error:: Expected file testfiles/scandir/discovery not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
38
.github/workflows/base.yml
vendored
Normal file
38
.github/workflows/base.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 'base'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
base:
|
||||
name: base
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
ignore: ignore
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/test.bash"
|
||||
notexpect="testfiles/ignore/ignore.bash"
|
||||
|
||||
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
|
||||
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
39
.github/workflows/check_together.yml
vendored
Normal file
39
.github/workflows/check_together.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: 'check_together'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check_together:
|
||||
name: check_together
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
ignore: ignore
|
||||
check_together: true
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/test.bash"
|
||||
notexpect="testfiles/ignore/ignore.bash"
|
||||
|
||||
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
|
||||
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
58
.github/workflows/scandir.yml
vendored
Normal file
58
.github/workflows/scandir.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: 'scandir'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
scandir:
|
||||
name: scandir
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: one
|
||||
with:
|
||||
scandir: testfiles/scandir
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/scandir/test.bash"
|
||||
notexpect="testfiles/test.bash"
|
||||
|
||||
if [[ ! "${{ steps.one.outputs.files }}" =~ $expect ]];then
|
||||
echo "::error:: Expected file $expect not found in ${{ steps.one.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ "${{ steps.one.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.one.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: two
|
||||
with:
|
||||
scandir: './testfiles/scandir'
|
||||
ignore: ignore
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/scandir/test.bash"
|
||||
notexpect="testfiles/test.bash"
|
||||
|
||||
if [[ ! "${{ steps.two.outputs.files }}" =~ $expect ]];then
|
||||
echo "::error:: Expected file $expect not found in ${{ steps.two.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ "${{ steps.two.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.two.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user