1 | name: CI |
---|
2 | |
---|
3 | on: |
---|
4 | push: |
---|
5 | pull_request: |
---|
6 | release: |
---|
7 | types: [published] |
---|
8 | schedule: |
---|
9 | # Daily at 3:21 |
---|
10 | - cron: '21 3 * * *' |
---|
11 | |
---|
12 | jobs: |
---|
13 | test: |
---|
14 | runs-on: ${{ matrix.os }} |
---|
15 | strategy: |
---|
16 | fail-fast: false |
---|
17 | matrix: |
---|
18 | os: |
---|
19 | - macos-latest |
---|
20 | - windows-latest |
---|
21 | - ubuntu-latest |
---|
22 | python-version: |
---|
23 | - 2.7 |
---|
24 | |
---|
25 | steps: |
---|
26 | |
---|
27 | # Get vcpython27 on Windows + Python 2.7, to build zfec |
---|
28 | # extension. See https://chocolatey.org/packages/vcpython27 and |
---|
29 | # https://github.com/crazy-max/ghaction-chocolatey |
---|
30 | - name: Install MSVC 9.0 for Python 2.7 on Windows |
---|
31 | if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' |
---|
32 | uses: crazy-max/ghaction-chocolatey@v1 |
---|
33 | with: |
---|
34 | args: install vcpython27 |
---|
35 | |
---|
36 | - name: Check out Tahoe-LAFS sources |
---|
37 | uses: actions/checkout@v2 |
---|
38 | |
---|
39 | - name: Fetch all history for all tags and branches |
---|
40 | run: git fetch --prune --unshallow |
---|
41 | |
---|
42 | - name: Set up Python ${{ matrix.python-version }} |
---|
43 | uses: actions/setup-python@v1 |
---|
44 | with: |
---|
45 | python-version: ${{ matrix.python-version }} |
---|
46 | |
---|
47 | - name: Install Python packages |
---|
48 | run: | |
---|
49 | pip install --upgrade codecov tox setuptools |
---|
50 | pip list |
---|
51 | |
---|
52 | - name: Display tool versions |
---|
53 | run: python misc/build_helpers/show-tool-versions.py |
---|
54 | |
---|
55 | # # codechecks throws type error; disable for now. |
---|
56 | # - name: Run "tox -e codechecks" |
---|
57 | # run: tox -e codechecks |
---|
58 | |
---|
59 | - name: Run "tox -e py27" |
---|
60 | if: matrix.python-version == '2.7' |
---|
61 | run: tox -e py27 |
---|
62 | |
---|
63 | - name: Run "tox -e coverage" |
---|
64 | run: tox -e coverage |
---|
65 | |
---|
66 | - name: Run "tox -e pyinstaller" |
---|
67 | run: tox -e pyinstaller |
---|
68 | |
---|
69 | - name: Upload eliot.log in case of failure |
---|
70 | uses: actions/upload-artifact@v1 |
---|
71 | if: failure() |
---|
72 | with: |
---|
73 | name: eliot.log |
---|
74 | path: eliot.log |
---|
75 | |
---|
76 | # Set Codecov token inside Project Settings > Secrets as |
---|
77 | # CODECOV_TOKEN. |
---|
78 | - name: Upload coverage report |
---|
79 | uses: codecov/codecov-action@v1 |
---|
80 | with: |
---|
81 | token: ${{ secrets.CODECOV_TOKEN }} |
---|
82 | file: coverage.xml |
---|