Skip to content

Commit 5cbfced

Browse files
authored
Merge pull request #7 from sideeffect-io/feature/codecoverage-ci
project: add codecoverage step in ci
2 parents 6062315 + cb8993d commit 5cbfced

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,29 @@ name: Build and test
33
on: [push]
44

55
jobs:
6-
build:
6+
Build:
77

88
runs-on: macos-12
99

1010
steps:
11-
- uses: actions/checkout@v3
11+
- name: Checkout branch
12+
uses: actions/checkout@v3
1213
- name: Build
1314
run: swift build
14-
- name: Run tests
15-
run: swift test
15+
16+
Test:
17+
18+
runs-on: macos-12
19+
20+
steps:
21+
- name: Checkout branch
22+
uses: actions/checkout@v3
23+
- name: Test
24+
run: swift test --enable-code-coverage
25+
- name: Generate coverage
26+
uses: sersoft-gmbh/swift-coverage-action@v3
27+
id: coverage-files
28+
- name: Upload coverage
29+
uses: codecov/codecov-action@v3
30+
with:
31+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Build and test](https://github.com/sideeffect-io/AsyncStateMachine/actions/workflows/ci.yml/badge.svg)](https://github.com/sideeffect-io/AsyncStateMachine/actions/workflows/ci.yml)
22
[![Lint](https://github.com/sideeffect-io/AsyncStateMachine/actions/workflows/lint.yml/badge.svg)](https://github.com/sideeffect-io/AsyncStateMachine/actions/workflows/lint.yml)
3+
[![Codecov](https://codecov.io/gh/sideeffect-io/AsyncStateMachine/branch/main/graph/badge.svg?token=CRAZF1LOM9)](https://codecov.io/gh/sideeffect-io/AsyncStateMachine)
34

45
# Async State Machine
56
**Async State Machine** aims to provide a way to structure an application thanks to state machines. The goal is to identify the states and the side effects involved in each feature and to model them in a consistent and scalable way thanks to a DSL.

0 commit comments

Comments
 (0)