Skip to content

Commit 8032177

Browse files
authored
Copy over from old branch to skip rebasing for just 1 file
1 parent acae6bf commit 8032177

1 file changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,79 @@ jobs:
1616
python-version: ['3.8', '3.9', '3.10']
1717
copier_config:
1818
- name: Base example
19-
module_name: example_project #The default module_name
19+
module_name: example_project # The default module_name
2020
extra_flags: ''
2121
foldername: base_example
2222
- name: Provide non-default answers
2323
module_name: 'drewtonian' # Same module name provided in `extra_flags` on the next line.
24-
extra_flags: '--data project_name=new_science --data module_name=drewtonian --data author_name=Drew --data author_email=ao@aol.com'
24+
extra_flags: >-
25+
--data project_name=new_science
26+
--data module_name=drewtonian
27+
--data author_name=Drew
28+
--data author_email=ao@aol.com
29+
--data project_license=BSD
30+
--data preferred_linter=black
31+
--data use_isort=false
32+
--data mypy_type_checking=basic
33+
--data create_example_module=no
34+
--data include_notebooks=no
35+
--data use_gitlfs=disabled
2536
foldername: 'non_default_answers'
26-
37+
2738
steps:
39+
2840
- name: Checkout code
2941
uses: actions/checkout@v3
42+
3043
- name: Set up Python
3144
uses: actions/setup-python@v4
3245
with:
3346
python-version: ${{ matrix.python-version }}
47+
3448
- name: Install Python dependencies
3549
run: |
3650
sudo apt-get update
3751
python -m pip install --upgrade pip
3852
python -m pip install copier
53+
3954
- name: Generate package
4055
run: |
4156
copier --vcs-ref HEAD --defaults ${{ matrix.copier_config.extra_flags }} copy ./ ../test/${{ matrix.copier_config.foldername }}
4257
cd ../test/${{ matrix.copier_config.foldername }}
4358
cat .copier-answers.yml
59+
4460
- name: Build package
4561
run: |
4662
cd ../test/${{ matrix.copier_config.foldername }}
4763
pip install .
4864
pip install .[dev]
65+
4966
- name: pylint checks
67+
if: ${{ contains (matrix.copier_config.name, 'Base') }}
5068
run: |
5169
cd ../test/${{ matrix.copier_config.foldername }}
5270
python -m pylint --recursive=y ./src/ --rcfile=./src/.pylintrc
71+
5372
- name: black checks
73+
if: ${{ contains(matrix.copier_config.extra_flags, 'preferred_linter=black') }}
5474
uses: psf/black@stable
5575
with:
5676
src: "../test/${{ matrix.copier_config.foldername }}/src"
77+
5778
- name: Install notebook requirements
58-
if: ${{ true }}
79+
if: ${{ !contains(matrix.copier_config.extra_flags, 'include_notebooks=no') }}
5980
run: |
6081
sudo apt-get install pandoc
6182
pip install -r ../test/${{ matrix.copier_config.foldername }}/docs/requirements.txt
6283
cat ../test/${{ matrix.copier_config.foldername }}/docs/requirements.txt
84+
6385
- name: Build docs
6486
run: |
6587
cd ../test/${{ matrix.copier_config.foldername }}
6688
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
89+
6790
- name: Tests
91+
if: ${{ !contains(matrix.copier_config.extra_flags, 'create_example_module=no') }}
6892
run: |
6993
cd ../test/${{ matrix.copier_config.foldername }}
7094
python -m pytest tests --cov=${{ matrix.copier_config.module_name }} --cov-report=xml

0 commit comments

Comments
 (0)