summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: eb34f056b3a85a83a8dc5ef8eb2b1dd0cd73eb9f (plain)
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
name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      # Failure for one Python version does not indicate it’ll fail for another
      fail-fast: false
      matrix:
        python-version: [3.6, 3.7, 3.8, pypy3]
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        sudo apt install ninja-build libxml2-dev libxslt1-dev mingw-w64
        pip install .
        pip install flake8 pytest pytest-cov
    - name: Lint with flake8
      run: |
        cd lulua
        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
    - name: Test with pytest
      run: |
        pytest lulua
    - name: Upload coverage
      uses: actions/upload-artifact@v2
      with:
        name: coverage
        path: htmlcov/
    - name: Build layouts
      # Due to the lack of corpora, we can’t run the entire thing here.
      run: |
        ./gen.sh > build.ninja
        ninja _build/report/ar-lulua.svg _build/report/ar-lulua.xmodmap _build/report/ar-lulua-w64.zip
    - name: Upload results
      uses: actions/upload-artifact@v2
      with:
        name: report
        path: _build/report/