Skip to content

Commit 208542c

Browse files
author
Kevin Ngai
committed
Update main.yml
- Use python 3.8.10 in quotes - Fix trailing " as syntax error - Fix to use ubuntu-20.04 as per actions/runner-images#10636 - Update to use actions/checkout@v3 and actions/setup-python@v5 - Set python3 to 3.8.10
1 parent a4d8d8e commit 208542c

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: build ⚙️
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
main:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-20.04
88
env:
99
WDR_LOGGING_LOGLEVEL: ERROR
1010
WDR_LOGGING_LOGFILE: /tmp/woudc-data-registry.log
@@ -23,24 +23,29 @@ jobs:
2323
WDR_ERROR_CONFIG: woudc_data_registry/tests/config/errors.csv
2424
WDR_ALIAS_CONFIG: data/aliases.yml
2525
WDR_EXTRA_CONFIG: data/extra-options.yml
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
strategy:
2828
matrix:
29-
python-version: [3.8]
29+
python-version: ["3.8.10"]
3030
steps:
31-
- uses: actions/checkout@v2
32-
- uses: actions/setup-python@v2
33-
name: Setup Python ${{ matrix.python-version }}
31+
- uses: actions/checkout@v3
32+
- name: Set up Python 3.8.10
33+
uses: actions/setup-python@v5
3434
with:
35-
python-version: ${{ matrix.python-version }}
35+
python-version: 3.8.10
36+
- name: Set python3 to 3.8.10
37+
run: |
38+
sudo update-alternatives --install /usr/bin/python3 python3 /opt/hostedtoolcache/Python/3.8.10/x64/bin/python3 1
39+
sudo update-alternatives --set python3 /opt/hostedtoolcache/Python/3.8.10/x64/bin/python3
40+
python3 --version
3641
- name: Install system dependencies 📦
3742
run: sudo apt-get install -y dh-python devscripts fakeroot debhelper python3-all python3-setuptools
3843
- name: Install woudc-extcsv requirement 📦
3944
run: |
4045
git clone https://github.com/woudc/woudc-extcsv.git
4146
cd woudc-extcsv
4247
pip install -r requirements.txt
43-
python setup.py install
48+
python3 setup.py install
4449
cd ..
4550
- name: Install requirements 📦
4651
run: |
@@ -50,21 +55,20 @@ jobs:
5055
pip install coveralls
5156
- name: Install package 📦
5257
run: python3 setup.py install
53-
- name: run tests ⚙️
58+
- name: Run tests ⚙️
5459
run: python3 setup.py test
55-
- name: run flake8
60+
- name: Run flake8
5661
run: find . -type f -name "*.py" | xargs flake8
57-
- name: build docs
62+
- name: Build docs
5863
run: cd docs && make html && cd ..
59-
- name: test coverage ⚙️
64+
- name: Test coverage ⚙️
6065
continue-on-error: true
6166
run: |
6267
coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_data_registry
6368
coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_report_generation
6469
coverage report -m
6570
coveralls --service=github
66-
- name: build Python package 🏗️
71+
- name: Build Python package 🏗️
6772
run: python3 setup.py bdist_wheel --universal
68-
- name: build Debian package 🏗️
73+
- name: Build Debian package 🏗️
6974
run: sudo debuild -b -uc -us
70-

0 commit comments

Comments
 (0)