Skip to content

Commit

Permalink
optimize ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1thas committed Oct 18, 2023
1 parent 21845fc commit 8814dd2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/shell-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ jobs:
os: [ ubuntu-22.04, macos-13 ]
steps:
- uses: actions/checkout@v3
- name: Install os dependencies
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
sudo apt update && sudo apt install attr kcov
else
brew install kcov diffutils grep coreutils
fi
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install attr kcov
- name: Install MacOS dependencies
if: runner.os == 'Darwin'
eun: brew install kcov diffutils grep coreutils
- name: Install bats-core
run: |
git clone https://github.com/bats-core/bats-core.git
Expand All @@ -51,10 +50,12 @@ jobs:
- name: Run bats tests
run: make shell-tests
- name: Coverage report
if: runner.os == 'Linux'
run: |
kcov --include-path=src /tmp/coverage bats tests/*.bats
cp $(find /tmp/coverage -type f -name 'cobertura.xml') coverage.xml
- uses: codecov/codecov-action@v2
if: runner.os == 'Linux'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Expand All @@ -67,13 +68,12 @@ jobs:
os: [ ubuntu-22.04, macos-13 ]
steps:
- uses: actions/checkout@v3
- name: Install os dependencies
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
sudo apt update && sudo apt install wget curl
else
brew install wget curl
fi
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install wget curl
- name: Install MacOS dependencies
if: runner.os == 'Darwin'
run: brew install wget curl
- name: Install using wget
run: |
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/sp1thas/dropboxignore/master/src/utils/install.sh)"
Expand Down

0 comments on commit 8814dd2

Please sign in to comment.