File: ci.yml

package info (click to toggle)
filtlong 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,564 kB
  • sloc: cpp: 3,533; python: 915; sh: 84; makefile: 37
file content (39 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
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
name: CI

on:
  push:
    branches: [ main, master ]
  pull_request:
    branches: [ main, master ]

jobs:
  test:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v5
    
    - name: Install dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y build-essential zlib1g-dev python3 locales

    # tests fail due to number formatting if the default runner locale ('C') is used
    - name: Set locale
      run: |
        sudo locale-gen en_US.UTF-8
        sudo update-locale LANG=en_US.UTF-8
    
    - name: Build project
      run: make -j
    
    - name: Test help menu and version
      run: |
        ./bin/filtlong --help > /dev/null
        ./bin/filtlong --version > /dev/null
    
    - name: Run tests
      run: python3 -m unittest discover -s test -p "test_*.py"
      env:
        LANG: en_US.UTF-8
        LC_ALL: en_US.UTF-8