mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-14 23:17:25 +00:00
fix: os
This commit is contained in:
parent
740a3e8687
commit
aab16cdfa3
1 changed files with 22 additions and 0 deletions
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
|
|
@ -59,6 +59,17 @@ jobs:
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run tests and collect coverage
|
- name: Run tests and collect coverage
|
||||||
run: npm run test
|
run: npm run test
|
||||||
|
- name: Detect os
|
||||||
|
run: |
|
||||||
|
family=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
codecov_os="windows"
|
||||||
|
[[ $family == "darwin" ]] && codecov_os="macos"
|
||||||
|
|
||||||
|
[[ $family == "linux" ]] && codecov_os="linux"
|
||||||
|
[[ $codecov_os == "linux" ]] && \
|
||||||
|
osID=$(grep -e "^ID=" /etc/os-release | cut -c4-)
|
||||||
|
[[ $osID == "alpine" ]] && codecov_os="alpine"
|
||||||
|
echo "Detected ${codecov_os}"
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -108,6 +119,17 @@ jobs:
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run tests and collect coverage
|
- name: Run tests and collect coverage
|
||||||
run: npm run test
|
run: npm run test
|
||||||
|
- name: Detect os
|
||||||
|
run: |
|
||||||
|
family=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
codecov_os="windows"
|
||||||
|
[[ $family == "darwin" ]] && codecov_os="macos"
|
||||||
|
|
||||||
|
[[ $family == "linux" ]] && codecov_os="linux"
|
||||||
|
[[ $codecov_os == "linux" ]] && \
|
||||||
|
osID=$(grep -e "^ID=" /etc/os-release | cut -c4-)
|
||||||
|
[[ $osID == "alpine" ]] && codecov_os="alpine"
|
||||||
|
echo "Detected ${codecov_os}"
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue