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

chore(ci): Migrate to GitHub Actions #193

Merged
merged 1 commit into from
Sep 10, 2023
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
181 changes: 0 additions & 181 deletions .circleci/config.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: CI

on:
push:
workflow_call:

concurrency:
group: ci-${{ github.ref_name }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: oracle
java-version: 20
check-latest: true
cache: gradle
- run: ./gradlew compileJava compileTestJava
- run: ./gradlew checkstyleMain checkstyleTest
- run: ./gradlew sonarlintMain sonarlintTest
- run: ./gradlew test
- run: ./gradlew build
- run: ./gradlew jacocoTestReport
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
1 change: 0 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Pages
on:
workflow_call:
workflow_dispatch:


permissions:
contents: read
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Release

on:
workflow_dispatch:

concurrency:
group: release
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/ci.yml

deploy:
runs-on: ubuntu-latest
needs: build

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: oracle
java-version: 20
check-latest: true
cache: gradle
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Provision
run: |
sed -i "s/{SIGNING_PASSWORD}/${{ secrets.SIGNING_PASSWORD }}/g" gradle.properties
sed -i "s/{SONATYPE_USERNAME_TOKEN}/${{ secrets.SONATYPE_USERNAME_TOKEN }}/g" gradle.properties
sed -i "s/{SONATYPE_PASSWORD_TOKEN}/${{ secrets.SONATYPE_PASSWORD_TOKEN }}/g" gradle.properties
- run: ./gradlew build
- run: yarn install --immutable
- run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pages:
uses: ./.github/workflows/pages.yml
needs: deploy
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/semantic-release",
"branches": ["release"],
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down
18 changes: 9 additions & 9 deletions .circleci/codecov.yml → codecov.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
codecov:
require_ci_to_pass: true
coverage:
status:
project:
default:
target: 90.0
threshold: "0%"
codecov:
require_ci_to_pass: true

coverage:
status:
project:
default:
target: 90.0
threshold: "0%"