-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 1.53 KB
/
ci.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
name: CI
on:
push:
branches:
- master
tags:
- '**'
pull_request: {}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: Update apt
run: sudo apt-get update
- name: install dependencies
run: |
sudo apt install systemd clamav clamav-daemon
sudo systemctl stop clamav-daemon.service
sudo rm /var/log/clamav/freshclam.log
sudo systemctl start clamav-daemon.service
sudo freshclam
sudo service clamav-daemon restart
sudo freshclam
make install
pip freeze
- name: lint
run: make lint
- name: Wait for clamd service to start
uses: jakejarvis/wait-action@v0.1.0
with:
time: '120s'
- run: sudo service clamav-daemon status
- name: test
run: make test
- name: codecov
run: bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: 'ee51eef9-8de5-4855-9be4-a5cf55257a73'
deploy:
needs:
- test
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP: tc-virus-checker
steps:
- uses: actions/checkout@v2
- run: git fetch --unshallow
- run: git switch master
- run: git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP.git
- run: git push heroku master