Skip to content

feat: add support for bitbucket #1528

feat: add support for bitbucket

feat: add support for bitbucket #1528

Workflow file for this run

name: Test, lint and publish
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
jobs:
style-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Git config
shell: bash
run: |
git config --add user.name "Renku Bot"
git config --add user.email "renku@datascience.ch"
- name: Update Avro Schemas
uses: devcontainers/ci@v0.3
with:
runCmd: make check_avro
push: never
skipContainerUserIdUpdate: false
- name: Style checks
uses: devcontainers/ci@v0.3
with:
runCmd: make style_checks
push: never
skipContainerUserIdUpdate: false
test-main:
runs-on: ubuntu-latest
needs:
- style-checks
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Git config
shell: bash
run: |
git config --add user.name "Renku Bot"
git config --add user.email "renku@datascience.ch"
- name: Test setup
uses: devcontainers/ci@v0.3
with:
runCmd: |
make test_setup
push: never
skipContainerUserIdUpdate: false
- name: Main tests
uses: devcontainers/ci@v0.3
with:
runCmd: |
make main_tests
push: never
skipContainerUserIdUpdate: false
- name: Migration tests
uses: devcontainers/ci@v0.3
with:
runCmd: |
make migration_tests
push: never
skipContainerUserIdUpdate: false
- name: Combine coverage data
uses: devcontainers/ci@v0.3
with:
runCmd: |
make collect_coverage
push: never
skipContainerUserIdUpdate: false
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-main-tests
parallel: true
path-to-lcov: coverage.lcov
test-schemathesis:
runs-on: ubuntu-latest
needs:
- style-checks
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Git config
shell: bash
run: |
git config --add user.name "Renku Bot"
git config --add user.email "renku@datascience.ch"
- name: Test setup
uses: devcontainers/ci@v0.3
with:
runCmd: |
make test_setup
push: never
skipContainerUserIdUpdate: false
- name: Schemathesis Tests
uses: devcontainers/ci@v0.3
with:
runCmd: |
make schemathesis_tests
push: never
skipContainerUserIdUpdate: false
env: |
HYPOTHESIS_PROFILE=ci
- name: Combine coverage data
uses: devcontainers/ci@v0.3
with:
runCmd: |
make collect_coverage
push: never
skipContainerUserIdUpdate: false
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-schemathesis-tests
parallel: true
path-to-lcov: coverage.lcov
coveralls:
needs:
- test-main
- test-schemathesis
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_SERVICE_NAME: gihub-action
with:
parallel-finished: true
carryforward: "run-main-tests,run-schemathesis-tests"
continue-on-error: true
publish:
runs-on: ubuntu-latest
needs:
- test-main
- test-schemathesis
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta data services
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
renku/renku-data-service
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.RENKU_DOCKER_USERNAME }}
password: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Build and push data services
uses: docker/build-push-action@v4
with:
context: .
file: ./projects/renku_data_service/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=renku/renku-data-service:buildcache
cache-to: type=registry,ref=renku/renku-data-service:buildcache,mode=max
- name: Docker meta background jobs
id: meta-background-jobs
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
renku/data-service-background-jobs
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push background jobs
uses: docker/build-push-action@v4
with:
context: .
file: ./projects/background_jobs/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-background-jobs.outputs.tags }}
labels: ${{ steps.meta-background-jobs.outputs.labels }}
cache-from: type=registry,ref=renku/data-service-background-jobs:buildcache
cache-to: type=registry,ref=renku/data-service-background-jobs:buildcache,mode=max
- name: Docker meta secrets
id: meta-secrets-storage
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
renku/secrets-storage
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push secrets image
uses: docker/build-push-action@v4
with:
context: .
file: ./projects/secrets_storage/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-secrets-storage.outputs.tags }}
labels: ${{ steps.meta-secrets-storage.outputs.labels }}
cache-from: type=registry,ref=renku/secrets-storage:buildcache
cache-to: type=registry,ref=renku/secrets-storage:buildcache,mode=max