Skip to content

Commit

Permalink
Merge pull request #1 from TimOrme/test_ci
Browse files Browse the repository at this point in the history
Setup CI build to block PRs
  • Loading branch information
TimOrme authored Mar 18, 2023
2 parents 8ce1b71 + 8e34c27 commit 021345d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
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 }}
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
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
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build:
lint:
black --check .
ruff check .
elm-format --validate elm/

# Format code
format:
Expand Down

0 comments on commit 021345d

Please sign in to comment.