-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/main' into feat/dll
- Loading branch information
Showing
2 changed files
with
98 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: CI/CD | ||
|
||
|
||
on: | ||
push | ||
|
||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python & Poetry | ||
uses: mishaga/action-poetry@1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-root | ||
|
||
- name: Analysing the code with flake8 | ||
run: poetry run flake8 --count basic_data_structure/ | ||
|
||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python & Poetry | ||
uses: mishaga/action-poetry@1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-root | ||
|
||
- name: Testing code with pytest | ||
run: poetry run pytest -v | ||
|
||
|
||
|
||
build-doc: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: | ||
- lint | ||
- test | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python & Poetry | ||
uses: mishaga/action-poetry@1 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-root | ||
|
||
- name: Generate documentation | ||
run: | | ||
mkdir docs | ||
poetry run pdoc -o docs/ -d google --no-search --no-show-source basic_data_structure | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/ | ||
|
||
|
||
deploy-doc: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: build-doc | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Documentation deployment | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Oops, something went wrong.