Skip to content

ci: reuse build job from ci workflow #183

ci: reuse build job from ci workflow

ci: reuse build job from ci workflow #183

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_call:
workflow_dispatch:
env:
TASK_X_REMOTE_TASKFILES: 1
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container: ghcr.io/nikaro/gha:latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: Lint
run: task lint --yes
test:
name: Test
runs-on: ubuntu-latest
container: ghcr.io/nikaro/gha:latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: Setup sops
run: brew install sops
- name: Test
run: task test --yes
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
container: ghcr.io/nikaro/gha:latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v3
- name: Build
run: task build --yes
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sopsy-dist
path: ./dist/
check:
name: Check
permissions: {}
runs-on: ubuntu-latest
needs: [lint, test, build]
if: always()
steps:
- name: Ensure no jobs failed
run: |-
[ "${{ !contains(needs.*.result, 'failure') }}" = "true" ] || exit 1