Skip to content

Commit 4074f18

Browse files
committed
Try to simplify action
1 parent 475494b commit 4074f18

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/workflow.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ jobs:
2929
if: "${{ matrix.node-version == '14.x' }}"
3030
- name: Tests
3131
run: npm run test:ci
32-
- name: Get test coverage OS flag
33-
id: test-coverage-os
34-
run: echo "::set-output name=flag::$(bash -c 'flag=${{ matrix.os }} && echo ${flag/-latest/}')"
35-
- name: Get test coverage Node.js version flag
36-
id: test-coverage-node
37-
run: echo "::set-output name=flag::$(bash -c 'flag=${{ matrix.node-version }} && echo node_${flag//./}')"
32+
- name: Get test coverage flags
33+
id: test-coverage-flags
34+
run: |-
35+
os=${{ matrix.os }}
36+
node=${{ matrix.node-version }}
37+
echo "::set-output name=os::${os/-latest/}"
38+
echo "::set-output name=node::node_${node//./}"
39+
shell: bash
3840
- uses: codecov/codecov-action@v1
3941
with:
4042
file: coverage/coverage-final.json
41-
flags: ${{ steps.test-coverage-os.outputs.flag }},${{ steps.test-coverage-node.outputs.flag }}
43+
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}

0 commit comments

Comments
 (0)