forked from tailhook/vagga
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 1.93 KB
/
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Tests
on:
push:
branches:
- master
- ci
pull_request:
branches:
- '*'
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [ubuntu-latest]
env:
VAGGA_CACHE: ~/.vagga/.cache
UBUNTU_MIRROR: http://mirrors.us.kernel.org/ubuntu/
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 500
- name: Install vagga
run: |
echo 'deb [arch=amd64 trusted=yes] https://ubuntu.zerogw.com vagga-testing main' | \
sudo tee /etc/apt/sources.list.d/vagga.list
sudo apt-get update
sudo apt-get install -y vagga
- name: Prepare variables
run: |
echo "VAGGA_CACHE_HASH=$(vagga _version_hash --short rust-musl)" >> $GITHUB_ENV
echo "VAGGA_CACHE_DIR=${VAGGA_CACHE/#\~/$HOME}" >> $GITHUB_ENV
- name: Vagga settings
run: |
set -eux
echo "\
cache-dir: ${VAGGA_CACHE}
ubuntu-mirror: ${UBUNTU_MIRROR}
" > ~/.vagga.yaml
mkdir -p ${VAGGA_CACHE_DIR}
- name: Vagga cache
uses: actions/cache@v2
with:
path: |
${{ env.VAGGA_CACHE }}
!${{ env.VAGGA_CACHE }}/cargo/registry/src
key: vagga-v1-${{ runner.os }}-${{ env.VAGGA_CACHE_HASH }}
- name: Build cache
uses: actions/cache@v2
with:
path: |
target
key: build-v1-${{ runner.os }}-${{ env.VAGGA_CACHE_HASH }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: vagga make-release
- name: Tests cache
uses: actions/cache@v2
with:
path: |
tmp/cache
key: tests-v1-${{ runner.os }}
- name: Run tests
run: |
./vagga -eUBUNTU_MIRROR test \
-j 4 \
--no-parallelize-within-files \
--verbose-run \
tests