forked from rdiff-backup/rdiff-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.51 KB
/
test_linux.yml
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
---
name: Test-Linux
on:
push:
branches: ['*_']
tags:
- '*_' # ending underscore for trying things
- 'v[0-9]+.[0-9]+.[0-9]+' # final version
- 'v[0-9]+.[0-9]+.[0-9]+[abrc]+[0-9]+' # alpha, beta, release candidate (rc)
- 'v[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # development versions
pull_request:
# paths-ignore: ['docs/**'] # we can't use it and enforce some checks
jobs:
test-make-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12","3.11","3.10","3.9"]
steps:
- name: skip on pull requests purely for documentation
run: echo SKIP=${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[DOC] ') }} >> "$GITHUB_ENV"
- uses: actions/checkout@v4
if: ${{ env.SKIP != 'true' }}
- name: Set up Python ${{ matrix.python-version }}
id: inst-py
if: ${{ env.SKIP != 'true' }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: ${{ env.SKIP != 'true' }}
run: |
sudo apt install librsync-dev libacl1-dev rdiff asciidoctor
sudo ${{ steps.inst-py.outputs.python-path }} -m pip install --upgrade -r requs/base.txt -r requs/optional.txt -r requs/test.txt
- name: Execute tests ${{ matrix.test-step }}
if: ${{ env.SKIP != 'true' }}
run: |
export RUN_COMMAND=
export SUDO="sudo -E env PATH=$PATH"
make test
# the empty RUN_COMMAND avoids using docker