-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ REFAC: build sys, pre-commit, release all updated
- Loading branch information
Showing
90 changed files
with
4,254 additions
and
3,865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
mock_code: | ||
# code-label: absolute path | ||
pw67: /usr/local/bin/pw.x | ||
pw67: /usr/local/bin/pw.x |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,118 +1,27 @@ | ||
name: Continuous Integration | ||
--- | ||
# Run basic tests for this app on the latest aiidalab-docker image. | ||
|
||
name: continuous-integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
docs: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-docs-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-docs- | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install python dependencies | ||
run: | ||
pip install -e .[docs] | ||
|
||
- name: Build documentation | ||
env: | ||
READTHEDOCS: 'True' | ||
run: | ||
SPHINXOPTS='-nW' make -C docs html | ||
|
||
pre-commit: | ||
# Adapted from: https://github.com/CasperWA/voila-optimade-client | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-pre-commit- | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install -e .[pre-commit,tests] | ||
- name: Run pre-commit | ||
run: | ||
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | ||
|
||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9] | ||
|
||
services: | ||
postgres: | ||
image: postgres:10 | ||
env: | ||
POSTGRES_DB: test_${{ matrix.backend }} | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-${{ matrix.python-version }}-tests | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install postgresql-12 | ||
- name: Install python dependencies | ||
run: | | ||
pip install -e .[tests] | ||
reentry scan | ||
- name: Run pytest | ||
run: | ||
pytest -sv tests | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install pre-commit==2.11.1 | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- release/* | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install pypa/build | ||
run: python -m pip install build | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
- name: Upload distribution artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release | ||
path: dist/ | ||
|
||
publish: | ||
|
||
needs: [build] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
name: Download distribution artifact | ||
with: | ||
name: release | ||
path: dist/ | ||
|
||
- name: Publish distribution on Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: startsWith(github.ref, 'refs/heads/release/') | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
|
||
- uses: softprops/[email protected] | ||
name: Create release | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
files: | | ||
dist/* | ||
generate_release_notes: true | ||
|
||
- name: Publish distribution on PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
Oops, something went wrong.