-
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.
* Unified Actions Flow
- Loading branch information
Showing
6 changed files
with
103 additions
and
133 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,100 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- '*feature/*' | ||
- 'dependabot/*' | ||
|
||
pull_request: | ||
types: [opened, reopened] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
poetry-build-test: | ||
strategy: | ||
fail-fast: false | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11.2" | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry=="1.7.1" | ||
|
||
- name: Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install Playsound | ||
run: scripts/install-playsound.sh | ||
|
||
- name: Dependencies | ||
run: poetry install --without dev | ||
|
||
- name: Build EQAlert | ||
run: poetry build -vvv | grep -vi ignoring | ||
|
||
- name: Tests | ||
run: poetry run pytest | ||
|
||
- name: Store Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: eqalert-bin | ||
path: | | ||
dist/eqalert-*.tar.gz | ||
dist/eqalert-*.whl | ||
retention-days: 1 | ||
|
||
docker-build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Build Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
pull: true | ||
push: false | ||
|
||
analyze: | ||
name: codeql | ||
runs-on: 'ubuntu-latest' | ||
timeout-minutes: 480 | ||
permissions: | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: python | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:python" |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.