Skip to content

Commit 2018105

Browse files
Add github actions for test and coverage
1 parent 81db31f commit 2018105

File tree

5 files changed

+105
-1
lines changed

5 files changed

+105
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/swift-test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Run Swift Tests'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
env:
11+
AWS_ENABLE_LOGGING : "true"
12+
AWS_LOG_LEVEL: "trace"
13+
14+
jobs:
15+
swift-tests:
16+
name: 'Swift Tests'
17+
runs-on: macos-latest
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
steps:
23+
# Checkout the repository to the GitHub Actions runner
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Test
27+
run: |
28+
make test
29+
- name: Coverage
30+
run: |
31+
make coverage
32+
- name: Upload Code Coverage
33+
uses: codecov/codecov-action@v3
34+
with:
35+
files: ${{ github.workspace }}/lcov.info

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
SWIFT_BIN_PATH = $(shell swift build --show-bin-path)
2+
EXAMPLE_PATH = ./Example
3+
BUILD_TEMP = .build/temp
4+
5+
test:
6+
swift test --sanitize=thread --enable-code-coverage
7+
8+
coverage:
9+
llvm-cov export $(SWIFT_BIN_PATH)/BreezePackageTests.xctest \
10+
--instr-profile=$(SWIFT_BIN_PATH)/codecov/default.profdata \
11+
--format=lcov > $(GITHUB_WORKSPACE)/lcov.info

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is a client for the [Breeze Lambda API](https://github.com/swift-sprinter/B
66

77
## Installation
88

9-
### Swift Pacakge Manager
9+
### Swift Package Manager
1010

1111
Add BreezeLambdaAPIClient as a dependency to the dependencies value of your `Package.swift`.
1212

0 commit comments

Comments
 (0)