-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dependabot, and move deployment to CI workflow
- Loading branch information
1 parent
2e3bfce
commit 97a8f30
Showing
3 changed files
with
75 additions
and
131 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
commit-message: | ||
prefix: ⬆️ | ||
schedule: | ||
interval: weekly | ||
- package-ecosystem: pip | ||
directory: / | ||
commit-message: | ||
prefix: ⬆️ | ||
schedule: | ||
interval: weekly |
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,27 +1,30 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
pull_request: | ||
|
||
jobs: | ||
|
||
pre-commit: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.8" | ||
- name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. | ||
run: pip install "virtualenv>20" | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: Run pre-commit in Tox | ||
run: tox -e pre-commit | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- uses: pre-commit/[email protected] | ||
|
||
tests: | ||
|
||
name: pytest (Python ${{ matrix.python-version }}, LAMMPS ${{ matrix.lammps-version }}) | ||
|
||
timeout-minutes: 30 | ||
|
||
strategy: | ||
|
@@ -94,3 +97,42 @@ jobs: | |
name: pytests-lammps | ||
flags: pytests | ||
fail_ci_if_error: true | ||
|
||
# https://github.com/marketplace/actions/alls-green#why | ||
check: # This job does nothing and is only used for the branch protection | ||
|
||
if: always() | ||
|
||
needs: | ||
- pre-commit | ||
- tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
publish: | ||
name: Publish to PyPi | ||
needs: [pre-commit, tests] | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/[email protected] | ||
- name: Set up Python 3.8 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.8" | ||
- name: install flit | ||
run: | | ||
pip install flit~=3.4 | ||
- name: Build and publish | ||
run: | | ||
flit publish | ||
env: | ||
FLIT_USERNAME: __token__ | ||
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }} |