Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ concurrency:
on:
push:
branches:
- '**'
tags:
- '*.*.*'
- 'next'
paths:
- 'src/**'
- 'Dockerfile'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- '.github/workflows/installer.yml'

env:
FRONTEND_BRANCH: ${{ github.ref_name == 'docs-next' && 'dev' || 'master' }}
FRONTEND_BRANCH: ${{ github.ref_name == 'docs' && 'master' || 'dev' }}
GITHUB_TOKEN: ${{ secrets.DOCS_GITHUB_TOKEN }}

jobs:
Expand All @@ -38,11 +38,6 @@ jobs:

- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths:
- 'src/**'
- 'pyproject.toml'
- 'pdm.lock'
- 'uv.lock'
- '.github/workflows/docs.yml'
- '.github/workflows/installer.yml'

Expand All @@ -17,13 +17,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# NOTE: Test full matrix there - it's less than a minute per run
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-latest
arch: arm64
# - os: macos-latest
# arch: amd64
- os: macos-latest
arch: amd64
- os: macos-latest
arch: arm64
steps:
Expand Down
48 changes: 36 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,44 @@ on:
- '*.*.*'

jobs:
release_test:
name: Release Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# NOTE: Test full matrix before release
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-latest
arch: arm64
- os: macos-latest
arch: amd64
- os: macos-latest
arch: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Run install
run: make install

- name: Run lint
run: uv run make lint

- name: Run tests
run: uv run make test
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ONFINALITY_API_KEY: ${{ secrets.ONFINALITY_API_KEY }}

release:
name: Release
needs: release_test
runs-on: ubuntu-22.04
env:
DOCKER_REGISTRY: ghcr.io
Expand Down Expand Up @@ -54,24 +90,12 @@ jobs:
type=pep440,pattern={{major}}
type=pep440,pattern={{major}}.{{minor}}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Run install
run: make install

- name: Run all checks
run: uv run make all
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ONFINALITY_API_KEY: ${{ secrets.ONFINALITY_API_KEY }}

- name: Publish stable image
uses: docker/build-push-action@v5
with:
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'pdm.lock'
- 'uv.lock'
- '.github/workflows/test.yml'

jobs:
Expand All @@ -17,13 +17,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# NOTE: arm64 macos is the fastest runner. Full matrix is tested in `release.yml`.
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-latest
arch: arm64
# - os: macos-latest
# arch: amd64
- os: macos-latest
arch: arm64
steps:
Expand All @@ -33,17 +28,11 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Run install
run: make install

- name: Run lint
run: uv run make lint
if: contains(matrix.os, 'ubuntu') && contains(matrix.arch, 'amd64')

- name: Run tests
run: uv run make test
Expand Down