Skip to content

with untar

with untar #37

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.12" ] # "3.8", "3.9", "3.10", "3.11",
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
python -m pip install .
- name: Test with pytest
run: pytest --cov=cdsaxs --cov-report=term --cov-report=html --cov-config=pyproject.toml tests/
- name: Archive code coverage results
uses: actions/upload-artifact@v4
if: ${{ matrix.python-version == 3.12 }}
with:
name: code-coverage-report
path: htmlcov/
retention-days: 1
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Choose Python version 3.11'
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- run: sudo apt-get install -y pandoc
- name: install package
run: pip install .
- name: install doc_reqs
run: pip install -r docs_requirements.txt
- name: 'run docs-build'
run: sphinx-build -j auto -b html "docs/source" "docs/build/html"
- uses: actions/upload-pages-artifact@v3.0.1
with:
path: 'docs/build/html/'
deploy-docs:
runs-on: ubuntu-latest
needs: [build-docs] # tests
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
name: CEA-MetroCarac/cdsaxs-doc
ref: refs/heads/main
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}
- name: untar_docs
run: tar xvf ${{ runner.temp }}/artifact.tar ${{ runner.temp }}/github-pages/
- name: copy_docs
run: cp -r ${{ runner.temp }}/github-pages/* ${{ github.workspace }}
- name: copy_docs
run: ls -al ${{ github.workspace }}