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

Poetry and workflow changes #29

Merged
merged 19 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy

on:
push:
merge_group:
release:
types:
- published

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
uses: qiboteam/workflows/.github/workflows/deploy-pip-poetry.yml@main
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
publish: ${{ github.event_name == 'release' && github.event.action == 'published' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' }}
poetry-extras: --with tests,docs --all-extras
secrets: inherit
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy docs

on:
workflow_dispatch:
push:
branches: [main]
tags:
- "*"

jobs:
evaluate-label:
runs-on: ubuntu-latest
outputs:
label: ${{ steps.label_step.outputs.version}}
steps:
- name: checks for the label
id: label_step
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "version=latest" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.ref_type }}" == "branch" ]] && [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
exit 1
fi
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "version=stable" >> $GITHUB_OUTPUT
fi
deploy-docs:
needs: [evaluate-label]
uses: qiboteam/workflows/.github/workflows/deploy-ghpages-latest-stable.yml@main
with:
python-version: 3.9
package-manager: "poetry"
dependency-path: "**/poetry.lock"
trigger-label: "${{needs.evaluate-label.outputs.label}}"
project: qibochem
poetry-extras: --with docs
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests

on:
workflow_dispatch:
push:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
uses: qiboteam/workflows/.github/workflows/rules-poetry.yml@main
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
poetry-extras: "--with docs,tests,analysis --all-extras"
secrets: inherit
Loading