@@ -10,78 +10,78 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
13
- python-version : [ '3.11' ]
14
- tmux-version : [ '2.6', '2.7', '2.8', '3.0a', '3.1b', '3.2a', '3.3a', 'master' ]
13
+ python-version : ['3.11']
14
+ tmux-version : ['2.6', '2.7', '2.8', '3.0a', '3.1b', '3.2a', '3.3a', 'master']
15
15
# balance ci coverage across supported python/tmux versions with CI speed
16
16
include :
17
17
- python-version : ' 3.8'
18
18
tmux-version : ' 2.6'
19
19
- python-version : ' 3.8'
20
20
tmux-version : ' master'
21
21
steps :
22
- - uses : actions/checkout@v3
23
-
24
- - name : Install poetry
25
- run : pipx install "poetry==1.6.1"
26
-
27
- - name : Set up Python ${{ matrix.python-version }}
28
- uses : actions/setup-python@v4
29
- with :
30
- python-version : ${{ matrix.python-version }}
31
- cache : ' poetry'
32
-
33
- - name : Setup tmux build cache for tmux ${{ matrix.tmux-version }}
34
- id : tmux-build-cache
35
- uses : actions/cache@v3
36
- with :
37
- path : ~/tmux-builds/tmux-${{ matrix.tmux-version }}
38
- key : tmux-${{ matrix.tmux-version }}
39
-
40
- - name : Build tmux ${{ matrix.tmux-version }}
41
- if : steps.tmux-build-cache.outputs.cache-hit != 'true'
42
- run : |
43
- sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison
44
- mkdir ~/tmux-builds
45
- mkdir ~/tmux-src
46
- git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }}
47
- cd ~/tmux-src/tmux-${{ matrix.tmux-version }}
48
- git checkout ${{ matrix.tmux-version }}
49
- sh autogen.sh
50
- ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install
51
- export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
52
- cd ~
53
- tmux -V
54
-
55
- - name : Install python dependencies
56
- run : |
57
- poetry install -E "test coverage lint"
58
-
59
- - name : Lint with black . --check
60
- run : poetry run black . --check
61
-
62
- - name : Lint with ruff .
63
- run : poetry run ruff .
64
-
65
- - name : Lint with mypy
66
- run : poetry run mypy .
67
-
68
- - name : Print python versions
69
- run : |
70
- python -V
71
- poetry run python -V
72
-
73
- - name : Test with pytest
74
- continue-on-error : ${{ matrix.tmux-version == 'master' }}
75
- run : |
76
- sudo apt install libevent-2.1-7
77
- export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
78
- ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
79
- tmux -V
80
- poetry run py.test --cov=./ --cov-report=xml
81
-
82
- - uses : codecov/codecov-action@v3
83
- with :
84
- token : ${{ secrets.CODECOV_TOKEN }}
22
+ - uses : actions/checkout@v3
23
+
24
+ - name : Install poetry
25
+ run : pipx install "poetry==1.6.1"
26
+
27
+ - name : Set up Python ${{ matrix.python-version }}
28
+ uses : actions/setup-python@v4
29
+ with :
30
+ python-version : ${{ matrix.python-version }}
31
+ cache : ' poetry'
32
+
33
+ - name : Setup tmux build cache for tmux ${{ matrix.tmux-version }}
34
+ id : tmux-build-cache
35
+ uses : actions/cache@v3
36
+ with :
37
+ path : ~/tmux-builds/tmux-${{ matrix.tmux-version }}
38
+ key : tmux-${{ matrix.tmux-version }}
39
+
40
+ - name : Build tmux ${{ matrix.tmux-version }}
41
+ if : steps.tmux-build-cache.outputs.cache-hit != 'true'
42
+ run : |
43
+ sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison
44
+ mkdir ~/tmux-builds
45
+ mkdir ~/tmux-src
46
+ git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }}
47
+ cd ~/tmux-src/tmux-${{ matrix.tmux-version }}
48
+ git checkout ${{ matrix.tmux-version }}
49
+ sh autogen.sh
50
+ ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install
51
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
52
+ cd ~
53
+ tmux -V
54
+
55
+ - name : Install python dependencies
56
+ run : |
57
+ poetry install -E "test coverage lint"
58
+
59
+ - name : Lint with black . --check
60
+ run : poetry run black . --check
61
+
62
+ - name : Lint with ruff .
63
+ run : poetry run ruff .
64
+
65
+ - name : Lint with mypy
66
+ run : poetry run mypy .
67
+
68
+ - name : Print python versions
69
+ run : |
70
+ python -V
71
+ poetry run python -V
72
+
73
+ - name : Test with pytest
74
+ continue-on-error : ${{ matrix.tmux-version == 'master' }}
75
+ run : |
76
+ sudo apt install libevent-2.1-7
77
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
78
+ ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
79
+ tmux -V
80
+ poetry run py.test --cov=./ --cov-report=xml
81
+
82
+ - uses : codecov/codecov-action@v3
83
+ with :
84
+ token : ${{ secrets.CODECOV_TOKEN }}
85
85
86
86
release :
87
87
runs-on : ubuntu-latest
90
90
91
91
strategy :
92
92
matrix :
93
- python-version : [" 3.11" ]
93
+ python-version : [' 3.11' ]
94
94
95
95
steps :
96
96
- uses : actions/checkout@v3
0 commit comments