Skip to content

Commit

Permalink
Pin requirements in CD release workflows (#1324)
Browse files Browse the repository at this point in the history
* Use pinned requirements in release workflow

* Use Python 3.10 throughout CI
  • Loading branch information
ml-evs committed Sep 6, 2022
1 parent ec59112 commit 99f47ee
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ jobs:
submodules: true
fetch-depth: 0

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -U -e .[all]
pip install -r requirements.txt -r requirements-dev.txt -r requirements-client.txt -r requirements-http-client.txt -r requirements-docs.txt
pip install -e .[all]
- name: Update changelog
uses: CharMixer/auto-changelog-action@v1
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
run: python -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish/@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
Expand All @@ -97,16 +98,17 @@ jobs:
fetch-depth: 0
ref: ${{ env.PUBLISH_UPDATE_BRANCH }}

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -U -e .[all]
pip install -r requirements.txt -r requirements-dev.txt -r requirements-client.txt -r requirements-http-client.txt -r requirements-docs.txt
pip install -e .[all]
- name: Set git config
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
OPTIMADE_INSERT_TEST_DATA: false # Must be specified as previous steps will have already inserted the test data

- name: Run the OPTIMADE Client CLI
if: matrix.python-version == 3.8
if: matrix.python-version == 3.10
run: |
coverage run --append --source optimade optimade/client/cli.py \
--filter 'nsites = 1' \
Expand Down Expand Up @@ -331,7 +331,9 @@ jobs:
pip install --upgrade setuptools requests
- name: Install package
run: pip install -U -e .[all]
run: |
pip install -r requirements.txt -r requirements-dev.txt -r requirements-client.txt -r requirements-http-client.txt -r requirements-docs.txt
pip install -e .[all]
- name: Build source distribution
run: python ./setup.py sdist
7 changes: 4 additions & 3 deletions .github/workflows/ci_cd_updated_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@ jobs:
fetch-depth: 0
submodules: true

- name: Set up Python 3.8
- name: Set up Python 3.10
if: env.RELEASE_RUN == 'false'
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install dependencies
if: env.RELEASE_RUN == 'false'
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel
pip install -U -e .[all]
pip install -r requirements.txt -r requirements-dev.txt -r requirements-client.txt -r requirements-http-client.txt -r requirements-docs.txt
pip install -e .[all]
- name: Set up git user
if: env.RELEASE_RUN == 'false'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
with:
ref: ${{ env.DEFAULT_REPO_BRANCH }}

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install `pre-commit` and dependencies
run: |
Expand Down

0 comments on commit 99f47ee

Please sign in to comment.