Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI configuration #379

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,22 @@ jobs:
matrix:
python-version: ['3.9', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# we need the full history to be able to get the chemiscope version with
# git describe during the build
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- name: configure access to git repositories in package-lock.json
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==4.14.0
run: python3 -m pip install tox
- name: Run Python tests
run: tox
15 changes: 8 additions & 7 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ on:

jobs:
build-website:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# we need the full history to be able to get the chemiscope version with
# git describe during the build
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: configure access to git repositories in package-lock.json
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]
- name: install npm dependencies
run: npm ci
- name: install python dependencies
run: |
python3 -m pip install tox==4.14.0
run: python3 -m pip install tox
- run: npm run build
- run: npm run download-examples
- run: tox -e docs
Expand All @@ -43,7 +44,7 @@ jobs:
- name: deploy website to gh-pages
# only deploy website from main branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages/
Expand All @@ -53,7 +54,7 @@ jobs:
- name: upload minified JS to GitHub release
# only upload minified JS from tags
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
dist/chemiscope.d.ts
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ name: Build Python wheel
on:
push:
branches: [main]
tags: '*'
tags: ['v*']
pull_request:
# Check all PR

jobs:
build-wheels:
permissions:
contents: write
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

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

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x

Expand All @@ -36,3 +37,13 @@ jobs:
path: |
dist/*.tar.gz
dist/*.whl

- name: upload wheel & sdist to GitHub release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading