Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: Improve GitHub actions (DEV-1112) (#2182)
  • Loading branch information
irinaschubert committed Sep 2, 2022
1 parent 5782494 commit 71c772f
Show file tree
Hide file tree
Showing 22 changed files with 266 additions and 512 deletions.
14 changes: 0 additions & 14 deletions .github/actions/cleanup/action.yml

This file was deleted.

8 changes: 1 addition & 7 deletions .github/actions/preparation/action.yml
Expand Up @@ -6,15 +6,9 @@ runs:
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Install requirements (apt)
run: sudo apt-get install ca-certificates-java expect unzip
shell: bash
- name: Coursier cache
uses: coursier/cache-action@v6
cache: sbt
20 changes: 10 additions & 10 deletions .github/pull_request_template.md
@@ -1,18 +1,20 @@
<!-- Important! Please follow the guidelines for naming Pull Requests: https://docs.dasch.swiss/latest/developers/dsp/contribution/ -->

## PR Checklist
Issue Number: DEV-

## Pull Request Checklist

### Basic Requirements

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type
### PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix: represents bug fixes
- [ ] Refactor: represents production code refactoring
- [ ] Feature: represents a new feature
Expand All @@ -22,18 +24,16 @@ What kind of change does this PR introduce?
- [ ] Test: all about tests: adding, refactoring tests (no production code change)
- [ ] Other... Please describe:

Issue Number: N/A
### Does this PR introduce a breaking change?

## Does this PR introduce a breaking change?
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

- [ ] Yes
- [ ] No

## Does this PR change client-test-data?
### Does this PR change client-test-data?

- [ ] Yes (don't forget to update the JS-LIB team about the change)
- [ ] No

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

## Other information
### Other information
67 changes: 67 additions & 0 deletions .github/workflows/build-and-test.yml
@@ -0,0 +1,67 @@
name: CI

on:
push:

jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Run preparatory steps
uses: dasch-swiss/dsp-api/.github/actions/preparation@main
- name: Run all tests
run: make test
- name: Upload coverage data to codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./target/scala-2.13/coverage-report/cobertura.xml
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
files: ./target/scala-2.13/coverage-report/cobertura.xml

test-client-test-data:
name: Test client-test-data
runs-on: ubuntu-latest
steps:
- name: Run preparatory steps
uses: dasch-swiss/dsp-api/.github/actions/preparation@main
- name: Create client-test-data
run: make client-test-data

test-repository-upgrade:
name: Test repository upgrade
runs-on: ubuntu-latest
steps:
- name: Run preparatory steps
uses: dasch-swiss/dsp-api/.github/actions/preparation@main
- name: Test repository upgrade
run: make test-repository-upgrade
- name: Dump docker logs
uses: jwalton/gh-docker-logs@v1

test-docs-build:
name: Test docs
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install requirements (pip, npm, apt)
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
npm install --global typedoc
sudo apt-get install graphviz
- name: Build docs
run: make docs-build

check-formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Run preparatory steps
uses: dasch-swiss/dsp-api/.github/actions/preparation@main
- name: Check formatting
run: make check
30 changes: 30 additions & 0 deletions .github/workflows/create-release.yml
@@ -0,0 +1,30 @@
name: Release

on:
pull_request:
types:
- closed

jobs:
create-release:
name: Create release PR
runs-on: ubuntu-latest
# Automate releases with Conventional Commit Messages as Pull Requests are merged into "main" branch
if: github.event.pull_request.merged == true
steps:
- name: Run release please action
uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GH_TOKEN }}
release-type: simple
package-name: dsp-api
changelog-types: '[
{"type": "feat", "section": "Enhancements", "hidden": false },
{"type": "fix", "section": "Bug Fixes", "hidden": false },
{"type": "build", "section": "Maintenance", "hidden": false },
{"type": "chore", "section": "Maintenance", "hidden": false },
{"type": "test", "section": "Maintenance", "hidden": false },
{"type": "style", "section": "Maintenance", "hidden": false },
{"type": "refactor", "section": "Maintenance", "hidden": false },
{"type": "docs", "section": "Documentation", "hidden": false }
]'
2 changes: 1 addition & 1 deletion .github/workflows/dependency-graph.yml
@@ -1,4 +1,4 @@
name: Update Dependency Graph
name: Dependencies

on:
push:
Expand Down

0 comments on commit 71c772f

Please sign in to comment.