-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (69 loc) · 1.97 KB
/
Copy pathtest-build.yml
File metadata and controls
83 lines (69 loc) · 1.97 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: test-build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
build-test:
name: build-test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
URL: https://fake-api.capter.io
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: run
uses: actions-rs/cargo@v1
with:
command: run
args: test --debug
- name: run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
deploy:
name: deploy
needs: build-test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/alpha'
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions-rs/install@v0.1
with:
crate: cargo-semver
version: 1.0.0-alpha.3
use-tool-cache: true
- run: cargo semver bump pre alpha
- run: echo "VERSION=$(cargo semver get)" >> $GITHUB_ENV
- run: echo $VERSION
- uses: actions/setup-node@v2
- run: cd ./installers/npm && npm version $VERSION
- name: commit new version
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: alpha
commit_message: v${{ env.VERSION }} [skip ci]
tagging_message: v${{ env.VERSION }}
commit_user_name: github-actions
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com