-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.6 KB
/
check.yml
File metadata and controls
53 lines (49 loc) · 1.6 KB
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
44
45
46
47
48
49
50
51
52
53
name: Checks
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Symlink gfortran (macOS)
if: runner.os == 'macOS'
run: |
# make sure gfortran is available
# https://github.com/actions/virtual-environments/issues/2524
# https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@10/*/lib/gcc/10 /usr/local/gfortran/lib
gfortran --version
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install flake8
- name: List installed packages
run: |
pip freeze
- name: Lint with flake8
run: |
flake8 .
- name: Run all Python files
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
source ./tests/bash_scripts/run_all_scripts.sh
elif [ "$RUNNER_OS" == "macOS" ]; then
source ./tests/bash_scripts/run_all_scripts.sh
elif [ "$RUNNER_OS" == "Windows" ]; then
./tests/bash_scripts/run_all_scripts.sh
else
echo "$RUNNER_OS not supported"
fi