• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Avatar
2
3on:
4  push:
5    branches: [ main ]
6  pull_request:
7    branches: [ main ]
8
9jobs:
10  build:
11    name: Build with Python ${{ matrix.python-version }}
12    runs-on: ubuntu-latest
13    strategy:
14      matrix:
15        python-version: ["3.10", "3.11"]
16    steps:
17      - uses: actions/checkout@v3
18      - name: Set Up Python ${{ matrix.python-version }}
19        uses: actions/setup-python@v4
20        with:
21          python-version: ${{ matrix.python-version }}
22      - name: Install
23        run: |
24          pip install --upgrade pip
25          pip install build
26          pip install .
27      - name: Build
28        run: python -m build
29  lint:
30    name: Lint for Python ${{ matrix.python-version }}
31    runs-on: ubuntu-latest
32    strategy:
33      matrix:
34        python-version: ["3.10", "3.11"]
35    steps:
36      - uses: actions/checkout@v3
37      - name: Set Up Python ${{ matrix.python-version }}
38        uses: actions/setup-python@v4
39        with:
40          python-version: ${{ matrix.python-version }}
41      - name: Install
42        run: pip install .[dev]
43      - run: mypy
44      - run: pyright
45  format:
46    name: Check Python formatting
47    runs-on: ubuntu-latest
48    steps:
49      - uses: actions/checkout@v3
50      - name: Set Up Python 3.11
51        uses: actions/setup-python@v4
52        with:
53          python-version: 3.11
54      - name: Install
55        run: |
56          pip install --upgrade pip
57          pip install .[dev]
58      - run: black --check avatar/
59      - run: isort --check avatar
60  test:
61    name: Test Bumble vs Bumble(s) [${{ matrix.shard }}]
62    runs-on: ubuntu-latest
63    strategy:
64      matrix:
65        shard: [
66           1/24,  2/24,  3/24,  4/24,
67           5/24,  6/24,  7/24,  8/24,
68           9/24, 10/24, 11/24, 12/24,
69          13/24, 14/24, 15/24, 16/24,
70          17/24, 18/24, 19/24, 20/24,
71          21/24, 22/24, 23/24, 24/24,
72        ]
73    steps:
74      - uses: actions/checkout@v3
75      - name: Set Up Python 3.11
76        uses: actions/setup-python@v4
77        with:
78          python-version: 3.11
79      - name: Install
80        run: |
81          pip install --upgrade pip
82          pip install rootcanal==1.10.0
83          pip install .
84      - name: Rootcanal
85        run: nohup python -m rootcanal > rootcanal.log &
86      - name: Test
87        run: |
88          avatar --list | grep -Ev '^=' > test-names.txt
89          timeout 5m avatar --test-beds bumble.bumbles --tests $(split test-names.txt -n l/${{ matrix.shard }})
90      - name: Rootcanal Logs
91        run: cat rootcanal.log
92