This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (46 loc) · 1.71 KB
/
main.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
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-and-test:
name: Build and test on Ubuntu - Node 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
# Copy Env File
- run: cp .env.testing .env
# Build and test Multinet server.
- run: pip install pipenv
- name: Generate new requirements.txt from Pipfile
run: pipenv lock --requirements > generated-requirements.txt
- name: Check generated requirements against existing requirements
run: diff requirements.txt generated-requirements.txt
- name: Capture pipenv version
run: echo "::set-output name=pipenv-version::$(pipenv --version | sed 's/,//g')"
id: pipenv-version
- uses: actions/cache@v1
id: multinet-cache
with:
path: /home/runner/.local/share/virtualenvs/
key: ${{ runner.os }}-${{ hashFiles('/home/runner/work/multinet-server/multinet-server/Pipfile.lock') }}-${{ steps.pipenv-version.outputs.pipenv-version }}-pipenv-cache-2
- name: Install pipenv packages
if: steps.multinet-cache.outputs.cache-hit != 'true'
run: pipenv install --dev --deploy
- run: pipenv run lint
- run: pipenv run format
- run: pipenv run typecheck
- run: pipenv run test
env:
ARANGO_HOST: ${{ secrets.CI_ARANGO_HOST }}
ARANGO_PASSWORD: ${{ secrets.CI_ARANGO_PASSWORD }}
ARANGO_PROTOCOL: ${{ secrets.CI_ARANGO_PROTOCOL }}
ARANGO_READONLY_PASSWORD: ${{ secrets.CI_ARANGO_READONLY_PASSWORD }}