Skip to content

Commit

Permalink
chore(ci): Migrate to GitHub Actions (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion authored Sep 10, 2023
1 parent 97cfbff commit 10ad868
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 192 deletions.
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%"

0 comments on commit 10ad868

Please sign in to comment.