diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml deleted file mode 100644 index 45c8bdad..00000000 --- a/.github/workflows/pytest.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Pytest -on: push -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: checkout repo content - uses: actions/checkout@v3 # Checkout the repository content to github runner. - - name: setup python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install graphviz - run: sudo apt install graphviz - shell: bash - - name: Install dependencies - run: | - sudo pip3 install --upgrade pip - sudo pip3 install sphinx_rtd_theme - sudo pip3 install sphinx - sudo pip3 install pytest - sudo pip3 install pytest-check - - name: Execute py script - env: - working-directory: ${{runner.workspace}}/cimpy - run: | - sudo python3 setup.py install - - name: Pytest - env: - working-directory: ${{runner.workspace}}/cimpy - run: | - sudo pytest -v -cov --junitxml=report.xml - - name: Upload pytest test results - uses: actions/upload-artifact@v3 - with: - name: pytest-results - path: ${{runner.workspace}}/cimpy/report.xml - if: ${{ always() }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..1567b020 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,40 @@ +name: Pytest + +on: + push: + branches: + - master + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: checkout repo content + uses: actions/checkout@v4 + + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Install graphviz + shell: bash + run: | + sudo apt-get -y install graphviz + + - name: Install Python dependencies + run: | + pip install .[dev,doc] + + - name: Run pytest + run: | + pytest -v -cov --junitxml=report.xml + + - name: Upload pytest test results + uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: pytest-results + path: ${{runner.workspace}}/cimpy/report.xml diff --git a/pyproject.toml b/pyproject.toml index 59805049..dac3e782 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,11 @@ dev = [ "pytest-check" ] +doc = [ + "sphinx", + "sphinx_rtd_theme" +] + [build-system] requires = ["setuptools >= 61.0"] build-backend = "setuptools.build_meta"