-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (74 loc) · 2.36 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
71
72
73
74
75
76
---
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/[email protected]
id: cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/[email protected]
id: cache-venv
with:
path: venv
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- uses: actions/[email protected]
id: cache-vendor
with:
path: vendor
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-ansible.yml') }}
restore-keys: |
${{ runner.os }}-vendor-
- uses: actions/[email protected]
id: cache-shellcheck
with:
path: bin/shellcheck
key: ${{ runner.os }}-shellcheck-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: |
${{ runner.os }}-shellcheck-
- uses: actions/[email protected]
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Setup bin directories
run: |
mkdir -p "$(pwd)/bin"
export PATH=$(pwd)/bin:$PATH
- name: Get shellcheck binary
if: steps.cache-shellcheck.outputs.cache-hit != 'true'
run: |
export SHELLCHECK_VERSION=v0.7.1
wget -qO- https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz | tar -xJv
mv "shellcheck-${SHELLCHECK_VERSION}/shellcheck" "$(pwd)/bin/shellcheck"
chmod +x "$(pwd)/bin/shellcheck"
- name: Install dependencies
run: |
make install
- name: build
run: |
docker system prune --all --force --volumes
docker-compose pull
make docker-build
- name: Lint and test
run: |
# FIXME
exit 0
make test