Skip to content

chore: implement release process #122

chore: implement release process

chore: implement release process #122

Workflow file for this run

#
# Copyright (c) 2021-2023 - for information on the respective copyright owner
# see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral.
#
# SPDX-License-Identifier: Apache-2.0
#
name: Build and test artifacts
on:
workflow_dispatch:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
test-java:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ephemeral-java-client
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'
- name: Setting up Github Package Repository as Maven Repository
uses: s4u/maven-settings-action@v2
with:
githubServer: false
servers: |
[{
"id": "github",
"username": "${{ github.actor }}",
"password": "${{ secrets.GITHUB_TOKEN }}"
}]
- name: Build with Maven
run: mvn install -Dskip.tests --batch-mode --update-snapshots --no-transfer-progress
- name: Run Tests
run: mvn verify --activate-profiles coverage --batch-mode --no-transfer-progress
- name: Collect Jacoco reports
run: echo ::set-output name=reports::$(find . -regex '.*/target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed 's/.$//')
id: jacoco
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.jacoco.outputs.reports }}
name: codecov
test-go:
runs-on: ubuntu-22.04
env:
GOPATH: ${{ github.workspace }}
GO111MODULE: on
REGISTRY: ghcr.io
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/go.mod
- name: Perform Build
run: |
go build ./...
- name: Perform Tests
run: |
go test ./... -coverprofile coverage.txt.tmp && cat coverage.txt.tmp | grep -Ev "fake|helper" > coverage.txt
- name: Publishing Coverage
uses: codecov/codecov-action@v3
with:
name: codecov
token: ${{ secrets.CODECOV_TOKEN }}