-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prettier: ensure svelte files are formatted
Also, remove default indent size for all files from editorconfig so that prettier's default of 2 spaces is used for most files (and only explicitly set it in the editor config for the most common file types).
- Loading branch information
Showing
35 changed files
with
310 additions
and
302 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
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,44 +1,44 @@ | ||
name: Deploy website to GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e docs | ||
- if: github.repository == 'beancount/fava' | ||
uses: actions/configure-pages@v4 | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "build/docs" | ||
deploy: | ||
if: github.repository == 'beancount/fava' && github.event_name == 'push' | ||
needs: "build" | ||
permissions: | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e docs | ||
- if: github.repository == 'beancount/fava' | ||
uses: actions/configure-pages@v4 | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "build/docs" | ||
deploy: | ||
if: github.repository == 'beancount/fava' && github.event_name == 'push' | ||
needs: "build" | ||
permissions: | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
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,39 +1,39 @@ | ||
name: Build Python package (and upload to PyPI on tags) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: python -m pip install -c constraints.txt build twine | ||
- run: python -m build | ||
- run: twine check dist/* | ||
- name: Publish release | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: python -m twine upload dist/* | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: python -m pip install -c constraints.txt build twine | ||
- run: python -m build | ||
- run: twine check dist/* | ||
- name: Publish release | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: python -m twine upload dist/* |
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,90 +1,90 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-py: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
py: ["3.12", "3.8"] | ||
toxenv: ["py", "old_deps"] | ||
exclude: | ||
- os: "macos-latest" | ||
toxenv: "old_deps" | ||
- os: "windows-latest" | ||
toxenv: "old_deps" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: touch src/fava/static/app.js | ||
- run: tox -e ${{ matrix.toxenv }} | ||
test-js: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: cd frontend && npm ci | ||
- run: cd frontend && npm run build | ||
- run: cd frontend && npm test | ||
lint-js: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: python -m pip install -c constraints.txt pre-commit | ||
- run: cd frontend && npm ci | ||
- run: pre-commit run -a eslint | ||
- run: cd frontend; npx tsc | ||
- run: cd frontend; npx svelte-check | ||
lint-python: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e lint | ||
build-pyinstaller: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e pyinstaller | ||
test-py: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
py: ["3.12", "3.8"] | ||
toxenv: ["py", "old_deps"] | ||
exclude: | ||
- os: "macos-latest" | ||
toxenv: "old_deps" | ||
- os: "windows-latest" | ||
toxenv: "old_deps" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: touch src/fava/static/app.js | ||
- run: tox -e ${{ matrix.toxenv }} | ||
test-js: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: cd frontend && npm ci | ||
- run: cd frontend && npm run build | ||
- run: cd frontend && npm test | ||
lint-js: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
cache-dependency-path: frontend/package-lock.json | ||
- run: python -m pip install -c constraints.txt pre-commit | ||
- run: cd frontend && npm ci | ||
- run: pre-commit run -a eslint | ||
- run: cd frontend; npx tsc | ||
- run: cd frontend; npx svelte-check | ||
lint-python: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e lint | ||
build-pyinstaller: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
cache-dependency-path: "constraints*.txt" | ||
- run: python -m pip install -c constraints.txt tox | ||
- run: tox -e pyinstaller |
Oops, something went wrong.