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

ci #242

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from
Draft

ci #242

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
16 changes: 16 additions & 0 deletions .github/actions/install-pkg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: install pkg

runs:
using: composite
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
- run: |
set -e
pip install -r requirements.txt
pip install -r tests/requirements.txt
pip install -r docs/requirements.txt
pip install .
shell: bash
17 changes: 17 additions & 0 deletions .github/actions/render-docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: render docs

runs:
using: composite
steps:
- uses: nikeee/setup-pandoc@v1
- uses: quarto-dev/quarto-actions/[email protected]
with:
fetch-depth: 0
- name: Render Quarto docs
run: python src/odm_validation/tools/render_quarto_docs.py
shell: bash
- name: Build and Commit
uses: sphinx-notes/[email protected] # requires checkout with `fetch-depth: 0`
with:
documentation_path: docs
target_branch: gh-pages
11 changes: 4 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: flake8 Lint
name: lint code

on: [pull_request]

Expand All @@ -7,14 +7,11 @@ jobs:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.8"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
path: "src tests"
max-line-length: "80"
20 changes: 5 additions & 15 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Generate docs and push to Github Pages
name: publish docs

on:
push:
branches:
Expand All @@ -10,27 +11,16 @@ on:
- 'LICENSE'
- 'assets/**'
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: nikeee/setup-pandoc@v1
- uses: quarto-dev/quarto-actions/[email protected]
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python dependencies
run: |
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Render Quarto docs
run: python tools/render_quarto_docs.py
- name: Build and Commit
uses: sphinx-notes/[email protected] # requires checkout with `fetch-depth: 0`
with:
documentation_path: docs
target_branch: gh-pages
- uses: ./.github/actions/install-pkg
- uses: ./.github/actions/render-docs
- name: Set GH-Pages domain name
run: echo 'validate-docs.phes-odm.org' > ${{ github.workspace }}/CNAME
- name: Commit CNAME file
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
name: Test code
name: test code

on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements.txt
- run: pip install -r tests/requirements.txt
- run: pip install .
- uses: ./.github/actions/install-pkg
- run: python -m unittest discover tests
22 changes: 3 additions & 19 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test documentation generation
name: test doc generation

on:
pull_request:
Expand All @@ -14,22 +14,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: nikeee/setup-pandoc@v1
- uses: quarto-dev/quarto-actions/[email protected]
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python dependencies
run: |
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Render Quarto docs
run: python src/odm_validation/tools/render_quarto_docs.py
- name: Build and Commit
uses: sphinx-notes/[email protected] # requires checkout with `fetch-depth: 0`
with:
documentation_path: docs
target_branch: gh-pages
- uses: ./.github/actions/install-pkg/
- uses: ./.github/actions/render-docs/
Loading