forked from hyperdevs-team/mini-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.54 KB
/
build-and-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "build-and-tests"
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
name: Check build & tests
runs-on: [apps-ci, ubuntu-latest]
timeout-minutes: 120
steps:
- name: Remove any previous hook 🥸
run: rm -rf .git/hooks
- name: Checkout 🔎
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache for Gems 💎
uses: actions/cache@v3
with:
path: |
.gems
~/.bundle
key: ${{ runner.os }}-cache-gems-${{ hashFiles('**/Gemfile.lock') }}
- name: Rake ⚙️
run: rake
- name: Run tests ⚙️
run: rake test
- name: Generate lcov file 📈
run: |
xcrun llvm-cov export \
-format="lcov" \
--ignore-filename-regex=".build|.test-bundle|Tests/" \
.build/debug/MiniPackageTests.xctest/Contents/MacOS/MiniPackageTests \
-instr-profile .build/debug/codecov/default.profdata \
> report.lcov
- name: Upload package tests coverage to Codecov 📋
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: report.lcov
flags: package
fail_ci_if_error: true
name: codecov-package
gcov_ignore: Tests/*
- name: Save Output 📦
uses: actions/upload-artifact@v3
with:
name: output
path: ${{ github.workspace }}/report.lcov