Skip to content

Commit

Permalink
feat: add artifact upload workflows (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: ittuann <ittuann@outlook.com>
  • Loading branch information
ittuann committed Aug 16, 2024
1 parent 7bef610 commit 1bb426d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ jobs:
run: pre-commit run --verbose --all-files
continue-on-error: true

- name: publish site as artifact
uses: actions/upload-artifact@v4
with:
name: Awesome-IntelligentCarRace-Site
path: site/

- name: Coverage test
run: |
coverage run -m pytest
coverage report
coverage xml && coverage html
run: pytest

- name: Upload coverage reports to Codecov
if: github.repository == 'ittuann/Awesome-IntelligentCarRace' && github.ref == 'refs/heads/main'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
mkdocs --version
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git clone https://github.com/ittuann/Awesome-IntelligentCarRace.git pages
LATEST_HASH=$(git rev-parse --short=7 HEAD)
cd pages
Expand All @@ -57,7 +57,7 @@ jobs:
git clean -fxd
cp -r ../site/* .
git add .
git commit -am "Deployed GitHub Pages - $LATEST_HASH"
git commit -a -s -m "Deployed GitHub Pages - $LATEST_HASH"
- name: Push changes
uses: ad-m/github-push-action@master

Check warning on line 63 in .github/workflows/gh-deploy.yml

View workflow job for this annotation

GitHub Actions / prettify

Consider replacing term "master" with an alternative such as "primary", "main", "default", "leader"

.github/workflows/gh-deploy.yml#L63 uses: ad-m/github-push-action@master
Expand Down
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[tool.black]
line-length = 120

[tool.autoflake]
check-diff = true

[tool.mypy]
pretty = true
warn_redundant_casts = true

[tool.ruff]
line-length = 120

Expand Down Expand Up @@ -28,15 +35,11 @@ ignore = ["F401", "UP009", "D415"]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.mypy]
pretty = true
warn_redundant_casts = true

[tool.coverage.report]
exclude_lines = [
"if 0:",
"if __name__ == .__main__.:",
]

[tool.pytest.ini_options]
addopts = "-ra --timeout=15 --reruns 2 --reruns-delay 1"
addopts = "-ra --cov=./scripts --cov-report=term --cov-report=xml --cov-report=html --timeout=15 --reruns 2 --reruns-delay 1"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ autoflake
pyupgrade
pre-commit
pytest
pytest-cov
pytest-timeout
pytest-rerunfailures
coverage

0 comments on commit 1bb426d

Please sign in to comment.