Skip to content

Commit

Permalink
Update all CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Mar 19, 2024
1 parent e66a4b4 commit f48ee8b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 43 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/docs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,21 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
pyproject.toml
requirements-dev.txt
miniforge-version: latest
activate-environment: ""
use-mamba: true

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
with:
macos-skip-brew-update: 'true'

- name: Install dependencies
- name: Install nox
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
pipx install nox
- name: Build docs
- name: Build documentation
run: |
make docs
nox -s docs --verbose
- name: Stage docs on gh-pages
working-directory: docs
Expand All @@ -51,7 +41,7 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: gh-pages

Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,34 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
pyproject.toml
requirements-dev.txt
miniforge-version: latest
activate-environment: ""
use-mamba: true

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
with:
macos-skip-brew-update: 'true'

- name: Install dependencies
- name: Install nox and uv
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pipx install nox
pipx install uv
- name: Check that versions match
id: version
run: |
nox -s dev
echo "Release tag: [${{ github.event.release.tag_name }}]"
PACKAGE_VERSION=$(python -c "import erdantic; print(erdantic.__version__)")
PACKAGE_VERSION=$(.nox/dev/bin/python -c "import erdantic; print(erdantic.__version__)")
echo "Package version: [$PACKAGE_VERSION]"
[ ${{ github.event.release.tag_name }} == "v$PACKAGE_VERSION" ] || { exit 1; }
echo "::set-output name=major_minor_version::v${PACKAGE_VERSION%.*}"
- name: Build package
run: |
make dist
nox -s build
- name: Build docs
run: |
make docs
nox -s docs
- name: Publish to Test PyPI
uses: pypa/[email protected]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.11"
miniforge-version: latest
activate-environment: ""
use-mamba: true

- name: Install nox and uv
- name: Install nox
run: |
pipx install nox
pipx install uv
- name: Test building documentation
run: |
Expand Down

0 comments on commit f48ee8b

Please sign in to comment.