Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebranding to jobq #92

Merged
merged 12 commits into from
Sep 18, 2024
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
120 changes: 60 additions & 60 deletions .github/workflows/backend-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
name: "Backend: Docker Image"

on:
push:
branches:
- main
pull_request:
paths:
- backend/**
- .github/**
branches:
- main
push:
branches:
- main
pull_request:
paths:
- backend/**
- .github/**
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read
packages: write
attestations: write
permissions:
id-token: write
contents: read
packages: write
attestations: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/jobs-server
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/jobq-server

steps:
- name: Checkout repository
uses: actions/checkout@v4
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# branch event
type=ref,event=branch
# tag event
type=ref,event=tag
# pull request event
type=ref,event=pr
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# branch event
type=ref,event=branch
# tag event
type=ref,event=tag
# pull request event
type=ref,event=pr

- name: Build and push Docker image
uses: docker/build-push-action@v6
id: push
with:
context: backend
file: backend/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
github-token: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
id: push
with:
context: backend
file: backend/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
github-token: ${{ github.token }}
112 changes: 56 additions & 56 deletions .github/workflows/backend-python.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
name: "Backend: Python"

on:
push:
branches:
- main
pull_request:
paths:
- backend/**
- .github/**
branches:
- main
push:
branches:
- main
pull_request:
paths:
- backend/**
- .github/**
branches:
- main

defaults:
run:
working-directory: backend
run:
working-directory: backend

jobs:
lint:
runs-on: ubuntu-latest
env:
MYPY_CACHE_DIR: "${{ github.workspace }}/.cache/mypy"
RUFF_CACHE_DIR: "${{ github.workspace }}/.cache/ruff"
PRE_COMMIT_HOME: "${{ github.workspace }}/.cache/pre-commit"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/python-lint
with:
pythonVersion: "3.11"
workingDirectory: backend
test:
name: Test jobs-infra on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up oldest supported Python on ${{ matrix.os }}
uses: ./.github/actions/python-deps
with:
pythonVersion: "3.11"
workingDirectory: "backend"
- name: Execute python tests
run: |
uv pip install . # need to install without --no-deps to work around non-portable dependency resolution in `uv pip compile`
uv run pytest -s --cov=src --cov-report=xml --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./backend/coverage.xml
slug: aai-institute/infrastructure-product
flags: backend
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./backend/junit.xml
slug: aai-institute/infrastructure-product
flags: backend
lint:
runs-on: ubuntu-latest
env:
MYPY_CACHE_DIR: "${{ github.workspace }}/.cache/mypy"
RUFF_CACHE_DIR: "${{ github.workspace }}/.cache/ruff"
PRE_COMMIT_HOME: "${{ github.workspace }}/.cache/pre-commit"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/python-lint
with:
pythonVersion: "3.11"
workingDirectory: backend
test:
name: Test jobs-infra on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up oldest supported Python on ${{ matrix.os }}
uses: ./.github/actions/python-deps
with:
pythonVersion: "3.11"
workingDirectory: "backend"
- name: Execute python tests
run: |
uv pip install . # need to install without --no-deps to work around non-portable dependency resolution in `uv pip compile`
uv run pytest -s --cov=src --cov-report=xml --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./backend/coverage.xml
slug: aai-institute/jobq
flags: backend
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./backend/junit.xml
slug: aai-institute/jobq
flags: backend
112 changes: 56 additions & 56 deletions .github/workflows/client-python.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
name: "Client library: Python"

on:
push:
branches:
- main
pull_request:
paths:
- client/**
- .github/**
branches:
- main
push:
branches:
- main
pull_request:
paths:
- client/**
- .github/**
branches:
- main

defaults:
run:
working-directory: client
run:
working-directory: client

jobs:
lint:
runs-on: ubuntu-latest
env:
MYPY_CACHE_DIR: "${{ github.workspace }}/.cache/mypy"
RUFF_CACHE_DIR: "${{ github.workspace }}/.cache/ruff"
PRE_COMMIT_HOME: "${{ github.workspace }}/.cache/pre-commit"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/python-lint
with:
pythonVersion: "3.11"
workingDirectory: client
test:
name: Test jobs-infra on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up oldest supported Python on ${{ matrix.os }}
uses: ./.github/actions/python-deps
with:
pythonVersion: "3.10"
workingDirectory: "client"
- name: Execute python tests
run: |
uv pip install . # need to install without --no-deps to work around non-portable dependency resolution in `uv pip compile`
uv run pytest --cov=src --cov-report=xml --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./client/coverage.xml
slug: aai-institute/infrastructure-product
flags: client
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./client/junit.xml
slug: aai-institute/infrastructure-product
flags: client
lint:
runs-on: ubuntu-latest
env:
MYPY_CACHE_DIR: "${{ github.workspace }}/.cache/mypy"
RUFF_CACHE_DIR: "${{ github.workspace }}/.cache/ruff"
PRE_COMMIT_HOME: "${{ github.workspace }}/.cache/pre-commit"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/python-lint
with:
pythonVersion: "3.11"
workingDirectory: client
test:
name: Test jobs-infra on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up oldest supported Python on ${{ matrix.os }}
uses: ./.github/actions/python-deps
with:
pythonVersion: "3.10"
workingDirectory: "client"
- name: Execute python tests
run: |
uv pip install . # need to install without --no-deps to work around non-portable dependency resolution in `uv pip compile`
uv run pytest --cov=src --cov-report=xml --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./client/coverage.xml
slug: aai-institute/jobq
flags: client
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./client/junit.xml
slug: aai-institute/jobq
flags: client
Loading