@@ -10,91 +10,91 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
13
- python-version : [ ' 2.7', ' 3.x' ]
14
- tmux-version : [ ' 2.6', ' 2.7', ' 2.8', ' 3.0a', ' 3.1b', ' master' ]
13
+ python-version : [" 2.7", " 3.x" ]
14
+ tmux-version : [" 2.6", " 2.7", " 2.8", " 3.0a", " 3.1b", " master" ]
15
15
steps :
16
- - uses : actions/checkout@v1
16
+ - uses : actions/checkout@v1
17
17
18
- - name : Set up Python ${{ matrix.python-version }}
19
- uses : actions/setup-python@v1
20
- with :
21
- python-version : ${{ matrix.python-version }}
18
+ - name : Set up Python ${{ matrix.python-version }}
19
+ uses : actions/setup-python@v1
20
+ with :
21
+ python-version : ${{ matrix.python-version }}
22
22
23
- - name : Get full Python version
24
- id : full-python-version
25
- shell : bash
26
- run : echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
23
+ - name : Get full Python version
24
+ id : full-python-version
25
+ shell : bash
26
+ run : echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
27
27
28
- - name : Install poetry
29
- run : |
30
- curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
31
- python get-poetry.py -y --version 1.0.10
32
- echo "::set-env name= PATH::$ HOME/.poetry/bin:$PATH"
33
- rm get-poetry.py
28
+ - name : Install poetry
29
+ run : |
30
+ curl -O -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
31
+ python get-poetry.py -y --version 1.0.10
32
+ echo "PATH=${ HOME} /.poetry/bin:${ PATH}" >> $GITHUB_ENV
33
+ rm get-poetry.py
34
34
35
- - name : Get poetry cache paths from config
36
- run : |
37
- echo ::set-env name=poetry_cache_dir:: $(poetry config --list | sed -n 's/.*cache-dir = //p' | sed -e 's/^"//' -e 's/"$//')
38
- echo ::set-env name= poetry_virtualenvs_path:: $(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^"//' -e 's/"$//')
35
+ - name : Get poetry cache paths from config
36
+ run : |
37
+ echo "poetry_virtualenvs_path= $(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\ "//' -e 's/\ "$//')" >> $GITHUB_ENV
38
+ echo " poetry_virtualenvs_path= $(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\ "//' -e 's/\ "$//')" >> $GITHUB_ENV
39
39
40
- - name : Configure poetry
41
- shell : bash
42
- run : poetry config virtualenvs.in-project true
40
+ - name : Configure poetry
41
+ shell : bash
42
+ run : poetry config virtualenvs.in-project true
43
43
44
- - name : Set up poetry cache
45
- uses : actions/cache@v2
46
- id : cache
47
- with :
48
- path : |
49
- .venv
50
- {{ env.poetry_cache_dir }}
51
- {{ env.poetry_virtualenvs_path }}
52
- key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
44
+ - name : Set up poetry cache
45
+ uses : actions/cache@v2
46
+ id : cache
47
+ with :
48
+ path : |
49
+ .venv
50
+ {{ env.poetry_cache_dir }}
51
+ {{ env.poetry_virtualenvs_path }}
52
+ key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
53
53
54
- - name : Ensure cache is healthy
55
- if : steps.cache.outputs.cache-hit == 'true'
56
- shell : bash
57
- run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
54
+ - name : Ensure cache is healthy
55
+ if : steps.cache.outputs.cache-hit == 'true'
56
+ shell : bash
57
+ run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
58
58
59
- - name : Setup tmux build cache for tmux ${{ matrix.tmux-version }}
60
- id : tmux-build-cache
61
- uses : actions/cache@v1
62
- with :
63
- path : ~/tmux-builds/tmux-${{ matrix.tmux-version }}
64
- key : tmux-${{ matrix.tmux-version }}
59
+ - name : Setup tmux build cache for tmux ${{ matrix.tmux-version }}
60
+ id : tmux-build-cache
61
+ uses : actions/cache@v1
62
+ with :
63
+ path : ~/tmux-builds/tmux-${{ matrix.tmux-version }}
64
+ key : tmux-${{ matrix.tmux-version }}
65
65
66
- - name : Build tmux ${{ matrix.tmux-version }}
67
- if : steps.tmux-build-cache.outputs.cache-hit != 'true'
68
- run : |
69
- sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison
70
- mkdir ~/tmux-builds
71
- mkdir ~/tmux-src
72
- git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }}
73
- cd ~/tmux-src/tmux-${{ matrix.tmux-version }}
74
- git checkout ${{ matrix.tmux-version }}
75
- sh autogen.sh
76
- ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install
77
- export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
78
- cd ~
79
- tmux -V
66
+ - name : Build tmux ${{ matrix.tmux-version }}
67
+ if : steps.tmux-build-cache.outputs.cache-hit != 'true'
68
+ run : |
69
+ sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison
70
+ mkdir ~/tmux-builds
71
+ mkdir ~/tmux-src
72
+ git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }}
73
+ cd ~/tmux-src/tmux-${{ matrix.tmux-version }}
74
+ git checkout ${{ matrix.tmux-version }}
75
+ sh autogen.sh
76
+ ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install
77
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
78
+ cd ~
79
+ tmux -V
80
80
81
- - name : Upgrade pip
82
- shell : bash
83
- run : poetry run python -m pip install pip -U
81
+ - name : Upgrade pip
82
+ shell : bash
83
+ run : poetry run python -m pip install pip -U
84
84
85
- - name : Install python dependencies
86
- run : |
87
- poetry install -E "test coverage lint"
88
- - name : Lint with flake8
89
- run : |
90
- poetry run flake8
91
- - name : Test with pytest
92
- continue-on-error : ${{ matrix.tmux-version == 'master' }}
93
- run : |
94
- export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
95
- ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
96
- tmux -V
97
- poetry run py.test --cov=./ --cov-report=xml
98
- - uses : codecov/codecov-action@v1
99
- with :
100
- token : ${{ secrets.CODECOV_TOKEN }}
85
+ - name : Install python dependencies
86
+ run : |
87
+ poetry install -E "test coverage lint"
88
+ - name : Lint with flake8
89
+ run : |
90
+ poetry run flake8
91
+ - name : Test with pytest
92
+ continue-on-error : ${{ matrix.tmux-version == 'master' }}
93
+ run : |
94
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
95
+ ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
96
+ tmux -V
97
+ poetry run py.test --cov=./ --cov-report=xml
98
+ - uses : codecov/codecov-action@v1
99
+ with :
100
+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments