-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* POETRY: init & add pyproject.toml * add poetry lock file && specify package location for poetry build * create build job on push * add poetry action w/ manual pip installs * cache poetry .venv * slight caching refactor * add whl build file * update github actions to most recent versions * add pytest as dev dep * add testing
- Loading branch information
Showing
6 changed files
with
412 additions
and
0 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,48 @@ | ||
name: Build eqalert | ||
|
||
on: push | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9.16"] | ||
poetry-version: ["1.7.1"] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Define a cache for the virtual environment based on the dependencies lock file | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Manual pip installs | ||
run: | | ||
poetry run pip install --upgrade pip | ||
poetry run pip install --upgrade wheel | ||
poetry run pip install playsound | ||
- name: Install Python deps | ||
run: poetry install --without dev | ||
- name: Build package | ||
run: poetry build | ||
- name: Store build artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: eqalert-bin | ||
path: | | ||
dist/eqalert-*.tar.gz | ||
dist/eqalert-*.whl | ||
retention-days: 1 | ||
|
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,33 @@ | ||
name: Test eqalert | ||
|
||
on: push | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9.16" | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: "1.7.1" | ||
- name: Define a cache for the virtual environment based on the dependencies lock file | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./.venv | ||
key: venv-dev-${{ hashFiles('poetry.lock') }} | ||
- name: Manual pip installs | ||
run: | | ||
poetry run pip install --upgrade pip | ||
poetry run pip install --upgrade wheel | ||
poetry run pip install playsound | ||
- name: Install Python deps | ||
run: poetry install | ||
- name: Run Tests | ||
run: poetry run pytest |
Oops, something went wrong.