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
24 changes: 9 additions & 15 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
push:
branches: [ "main" ]
paths:
- 'eth_validator_watcher/*.py'
- 'eth_validator_watcher/**'
- 'Dockerfile'
- 'pyproject.toml'
- ".github/workflows/docker.yaml"
- '.github/workflows/docker.yaml'
tags:
- "v*"
pull_request:
branches: ["main"]
paths:
- 'eth_validator_watcher/*.py'
- 'eth_validator_watcher/**'
- 'Dockerfile'
- 'pyproject.toml'
- ".github/workflows/docker.yaml"
- '.github/workflows/docker.yaml'

permissions:
contents: read
Expand All @@ -26,13 +26,9 @@ jobs:
docker-build-push:
runs-on: ubuntu-latest
steps:
- name: "git:checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "docker:meta"
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true
Expand All @@ -42,18 +38,16 @@ jobs:
type=semver,pattern={{version}}
- name: "docker:login:ghcr.io"
if: github.ref_type == 'tag'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ github.token }}
- name: "docker:buildx"
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: "docker:build-push"
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,14 @@ jobs:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
uses: astral-sh/setup-uv@v6
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest --cov eth_validator_watcher --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading