-
Notifications
You must be signed in to change notification settings - Fork 63
100 lines (91 loc) · 3.36 KB
/
integration.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Integration Tests
on:
push:
pull_request:
branches:
- main
- sanic
- sanic2
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo chmod 755 /var/log
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe multiverse"
sudo apt-get update -qq
sudo apt-get install -qq libjson-c-dev munge libmunge2 libmunge-dev libcurl4-openssl-dev autoconf automake libtool curl make valgrind xfsprogs squashfs-tools libcap-dev
sudo modprobe squashfs
sudo modprobe xfs
pip install -r imagegw/requirements.txt
# install packages for tests
pip install nose coverage==5.5 cpp-coveralls==0.4.2
# Not sure why this is needed
LOC=$(dirname $(which coveralls) ); sudo mv $LOC/coveralls $LOC/cpp-coveralls
pip install coveralls coveralls-merge
pip install pexpect
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 4.2
- name: Build shifter
run: |
echo "Disabling autoclear for Travis and Kernel 5.4"
sed -i 's/useAutoclear = 1;/useAutoclear = 0;/' ./src/shifter_core.c
export PROC_COUNT=$(cat /proc/cpuinfo | egrep '^processor' | wc -l)
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc/shifter --disable-staticsshd
MAKEFLAGS="-j$PROC_COUNT" make
MAKEFLAGS="-j$PROC_COUNT" make check
sudo make install
- name: C Unit Tests
run: |
cp imagegw/test.json.example test.json
mkdir /tmp/imagegw /tmp/systema /tmp/systemb
rm imagegw/test/sha256sum
cd src/test
export DO_ROOT_TESTS=1
export DO_ROOT_DANGEROUS_TESTS=1
../../extra/CI/test_script.sh
cd ../..
- name: Python Tests
run: |
export ORIGPATH=$PATH
export PATH=$PWD/imagegw/test:$PATH
PYTHONPATH=$PWD/imagegw nosetests -s --with-coverage imagegw/test
export PATH=$ORIGPATH
- name: Run Integration Test
run: |
export BUILDDIR=$(pwd)
cd /
$BUILDDIR/extra/CI/integration_test.sh
cd $BUILDDIR
- name: Upload coverage
run: |
cpp-coveralls --exclude dep -n --dump cpp_coveralls.json
#coveralls-merge -d cpp_coveralls.json > merged-coverage
coveralls --merge=cpp_coveralls.json --service=github
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Valgrind Output
path: src/test/valgrind.out
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: github
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: 'Post Content :rocket:'
SLACK_TITLE: Integration Test
SLACK_USERNAME: rtCamp
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}