Skip to content

fix docker

fix docker #26

Workflow file for this run

name: Test package
on: [push, pull_request, workflow_call, workflow_dispatch]
jobs:
CodeQL-Analysis:
name: CodeQL analysis
runs-on: ubuntu-latest
permissions:
security-events: write # required for all workflows
# only required for workflows in private repositories:
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: python
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install hatch
- name: Test with coverage
working-directory: trapi-predict-kit
run: |
hatch run test
update-docs:
if: ${{ github.event_name == 'push' }}
needs: [ tests ]
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
working-directory: trapi-predict-kit
run: |
pip install ".[doc]"
- name: Deploy mkdocs on GitHub Pages
working-directory: trapi-predict-kit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdocs build -d docs-dist
# mkdocs gh-deploy
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './trapi-predict-kit/docs-dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2