-
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.62 KB
/
build.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
65
66
name: build
on:
push:
branches: ['main']
tags: ['v*']
paths-ignore: ['**.md']
pull_request:
branches: ['main']
tags: ['dependencies']
paths-ignore: ['**.md']
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
id: prep
run: |
echo ::set-output name=test_dir::test
echo ::set-output name=test_reports_dir::build/bats-tmp/test-reports
echo ::set-output name=test_reports_format::junit
- name: Run tests
uses: bkahlert/bats-wrapper@v0.1.4
env:
BATSW_ARGS: --env BUILD_TAG="${{ steps.prep.outputs.build_tag }}"
with:
report-formatter: ${{ steps.prep.outputs.test_reports_format }}
output: ${{ steps.prep.outputs.test_reports_dir }}
tests: ${{ steps.prep.outputs.test_dir }}
- name: Upload test reports
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-reports
if-no-files-found: error
path: ${{ steps.prep.outputs.test_reports_dir }}/*.xml
release-draft:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Draft release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
body_path: CHANGELOG.md
files: init.rc
token: ${{ secrets.GITHUB_TOKEN }}