-
Notifications
You must be signed in to change notification settings - Fork 38
53 lines (45 loc) · 1.26 KB
/
check.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
name: check code
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: hash for podman image
id: podman_image_hash
run: |
echo "::set-output name=value::$(/bin/find bin .github -type f -exec md5sum {} \; | sort -k 2 | md5sum)"
shell: bash
- uses: actions/cache@v2
with:
path: podman
key: ${{ runner.os }}-podman-${{ steps.podman_image_hash.outputs.value }}
- name: Install
run: |
bin/install-on-ubuntu
mkdir -p podman
sudo podman export mlr > podman/mlr.tar
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/podman-mlr
- name: lint
run: |
cat << EOF | sudo podman exec -i -w /opt/mailur mlr /bin/bash
set -exuo pipefail
. bin/activate
bin/manage.py lint --ci
EOF
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/podman-mlr
- name: test
run: |
cat << EOF | sudo podman exec -i -w /opt/mailur mlr /bin/bash
set -exuo pipefail
. bin/activate
bin/manage.py test
EOF