Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AtticusZeller committed Jan 10, 2024
1 parent d5243b5 commit 1d42ded
Show file tree
Hide file tree
Showing 8 changed files with 2,416 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Atticuszz
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix:
# Python
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix:
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI/CD

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test:
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10", "3.11" ,"3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Clone Repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.7.1

- name: Run Tests
run: poetry run tests

- name: Upload Coverage
uses: codecov/codecov-action@v1
# publish:
# needs: test
# if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'Atticuszz' }}
# runs-on: ubuntu-latest
# name: "Bump version, create changelog and publish"
# environment:
# name: pypi
# url: https://pypi.org/project/supabase-py-async/
# permissions:
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# contents: write # needed for github actions bot to write to repo
# steps:
# - name: Clone Repository
# uses: actions/checkout@v3
# with:
# ref: ${{ github.ref }}
# fetch-depth: 0
# token: ${{ secrets.ATTICUS_PAT }}
# - name: Python Semantic Release
# id: release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Publish package distributions to PyPI
# uses: pypa/[email protected]
# # NOTE: DO NOT wrap the conditional in ${{ }} as evaluate to true.
# if: steps.release.outputs.released == 'true'
#
# - name: Publish package distributions to GitHub Releases
# uses: python-semantic-release/upload-to-gh-release@main
# if: steps.release.outputs.released == 'true'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
2,264 changes: 2,264 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions poetry_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def run_tests() -> None:

# Run pre-commit tests
# run_cmd("poetry run pre-commit autoupdate")
# run_cmd("poetry run pre-commit run --all-files")
run_cmd("poetry run pre-commit run --all-files")

# Generate coverage report
run_cmd("poetry run pytest --asyncio-mode=strict --cov=./ --cov-report=xml --cov-report=html -vv")
# run_cmd("poetry run pytest --asyncio-mode=strict --cov=./ --cov-report=xml --cov-report=html -vv")


if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions tests/test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SUPABASE_TEST_URL=https://vtqsboqphlisizfwhrtg.supabase.co
SUPABASE_TEST_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ0cXNib3FwaGxpc2l6ZndocnRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDQ1MzY4NzIsImV4cCI6MjAyMDExMjg3Mn0.OgApaTXDr7llopKTplpXCsUzDubjbiQFXlaaFf6wlbY

0 comments on commit 1d42ded

Please sign in to comment.