-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TimOrme/test_ci
Setup CI build to block PRs
- Loading branch information
Showing
3 changed files
with
41 additions
and
9 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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: Python package | ||
on: | ||
push: | ||
branches: | ||
- '**' # matches every branch | ||
- '!main' # excludes main | ||
|
||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup just | ||
uses: extractions/setup-just@v1 | ||
- uses: sparksp/elm-format-action@v1 | ||
with: | ||
elm_files: | | ||
elm/src/ | ||
- name: Setup Elm | ||
uses: jorelali/setup-elm@v5 | ||
- name: Compile Elm | ||
run: just check | ||
run: just build | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
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,31 @@ | ||
name: PR Checks | ||
on: | ||
push: | ||
branches: | ||
- '**' # matches every branch | ||
- '!main' # excludes main | ||
|
||
jobs: | ||
checkpr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup just | ||
uses: extractions/setup-just@v1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
# Node needed for elm-format | ||
node-version: 18 | ||
- name: elm-format install | ||
run: npm install -g elm-format | ||
- name: Install dev dependencies | ||
run: poetry install --only=dev | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Check linting | ||
run: just lint |
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ build: | |
lint: | ||
black --check . | ||
ruff check . | ||
elm-format --validate elm/ | ||
|
||
# Format code | ||
format: | ||
|