-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (56 loc) · 1.64 KB
/
ci.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
name: CI
on: [pull_request]
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'poetry'
- name: Install dependencies
run: poetry install --no-interaction --no-root
- run: source .venv/bin/activate
- uses: pre-commit/action@v3.0.0
test:
runs-on: ubuntu-20.04
steps:
- name: Cache bazel
uses: actions/cache@v3
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: ${{ runner.os }}-${{ env.cache-name }}
- uses: actions/checkout@v3
- name: Build and test the code
run: bazel test //src/... //test/aspect:all
- name: Execute Mypy
run: bazel build --config=mypy //src/... //test/aspect:all
# tests:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: snok/install-poetry@v1
# with:
# virtualenvs-create: true
# virtualenvs-in-project: true
# installer-parallel: true
# - uses: actions/setup-python@v4
# with:
# python-version: 3.8
# cache: 'poetry'
# - name: Install dependencies
# run: poetry install --no-interaction --no-root
# - name: Display Python version
# run: python -c "import sys; print(sys.version)"
# - name: Coverage
# run: poetry run pytest --cov --pylint