-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
207 additions
and
92 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,46 @@ | ||
name: Build Poetry | ||
|
||
description: 'Build Poetry' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Get full Python version | ||
id: full-python-version | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Bootstrap poetry | ||
run: curl -sL https://install.python-poetry.org | python - -y | ||
shell: bash | ||
|
||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
shell: bash | ||
|
||
- name: Configure poetry | ||
run: poetry config virtualenvs.in-project true | ||
shell: bash | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ inputs.working-directory }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: timeout 10s poetry run pip --version || rm -rf .venv | ||
shell: bash | ||
|
||
- name: Install Dependencies | ||
run: poetry install | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Code Stability | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: stability-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
stability: | ||
name: Code Stability | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build Python | ||
uses: ./.github/actions | ||
|
||
- name: Install tools | ||
run: poetry install --only dev | ||
|
||
- id: ruff | ||
if: always() | ||
run: poetry run ruff --format=github surrealdb/ | ||
|
||
- id: Black | ||
if: always() | ||
run: poetry run black surrealdb/ --check --verbose --diff --color | ||
|
||
- id: mypy | ||
if: always() | ||
run: poetry run mypy surrealdb/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 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
Oops, something went wrong.