Skip to content

Commit

Permalink
chore(ci): Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion committed Sep 10, 2023
1 parent 97cfbff commit 878b871
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 193 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
18 changes: 9 additions & 9 deletions .circleci/codecov.yml → .github/workflows/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%"
2 changes: 1 addition & 1 deletion .github/workflows/owner-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Auto approve for owner

on:
pull_request:
pull_request_target:
types: [opened, reopened]

jobs:
Expand Down
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

0 comments on commit 878b871

Please sign in to comment.