Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into add_adapter-logback_feature
Browse files Browse the repository at this point in the history
# Conflicts:
#	sofa-serverless-runtime/sofa-serverless-adapter-ext/pom.xml
  • Loading branch information
知行 committed Nov 16, 2023
2 parents de4f364 + dc369ea commit c84423e
Show file tree
Hide file tree
Showing 372 changed files with 13,124 additions and 563 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/arkctl_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Arkctl Release Action

on:
workflow_dispatch:
inputs:
version:
description: 'version of current arkctl'
required: true

permissions:
contents: write
packages: write

jobs:
prepare:
name: Prepare for build
runs-on: ubuntu-latest
outputs:
is-tag-created: ${{steps.check_tag.outputs.exists}}
steps:
- uses: actions/checkout@v3
- name: Check if Tag Exists
id: check_tag
run: |
TAG_EXISTS=$(git ls-remote --tags origin arkctl-release-${{ github.event.inputs.version }})
if [ -z "$TAG_EXISTS" ]; then
echo "exists=False" >> $GITHUB_OUTPUT
else
echo "exists=True" >> $GITHUB_OUTPUT
fi
create-tag:
name: Create for branch if empty
if: needs.prepare.outputs.is-tag-created == 'False'
runs-on: ubuntu-latest
needs: ['prepare']
steps:
- name: Output variable
run: echo "Created Branch ${{needs.prepare.outputs.is-tag-created}} ?"
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_RUNNER_DEBUG: true
with:
tag_name: arkctl-release-${{ github.event.inputs.version }}
release_name: Release arkctl ${{ github.event.inputs.version }} binary!

release:
name: Release binary
runs-on: ubuntu-latest
if: always()
needs: ['prepare', 'create-tag']
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows

steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.21.3"
project_path: "./arkctl"
binary_name: "arkctl"
asset_name: "arkctl-${{ github.event.inputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}"
release_tag: "arkctl-release-${{ github.event.inputs.version }}"
49 changes: 49 additions & 0 deletions .github/workflows/arkctl_unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Arkctl Unit Test
run-name: ${{ github.actor }} pushed arkctl code

on:
push:
branches:
- master
paths:
- 'arkctl/**'

pull_request:
branches:
- master
paths:
- 'arkctl/**'

# enable manually running the workflow
workflow_dispatch:

env:
CGO_ENABLED: 0
GOOS: linux
WORK_DIR: arkctl

defaults:
run:
working-directory: arkctl

jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up go
uses: actions/setup-go@v4
with:
go-version: '1.21.1'
cache-dependency-path: ${{ env.WORK_DIR }}/go.sum

- name: Run go mod
run: go mod download

- name: Test
run: make test

# https://about.codecov.io/blog/getting-started-with-code-coverage-for-golang/
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
30 changes: 19 additions & 11 deletions .github/workflows/arklet_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defaults:
working-directory: sofa-serverless-runtime

jobs:
unit-test:
unit-test-for-jdk8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -44,13 +44,21 @@ jobs:
- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3

# - name: Setup Java JDK
# uses: actions/setup-java@v3.12.0
# with:
# distribution: adopt
# java-version: 17
#
# - name: Test
# run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
# && sh ./check_format.sh
# && mvn test
unit-test-for-jdk17:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: maven

- name: Test
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
&& sh ./check_format.sh
&& mvn test

- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Build with Maven
working-directory: sofa-serverless-runtime
run: mvn clean install -DskipTests -B -U -e && sh ./check_format.sh
release:
release_for_jdk8:
needs: build
runs-on: ubuntu-latest
steps:
Expand All @@ -40,9 +40,32 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Prelease
run: mvn --batch-mode deploy -DskipTests -Prelease,8-release
working-directory: sofa-serverless-runtime
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
release_for_jdk17:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Prelease,17-release
working-directory: sofa-serverless-runtime
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
26 changes: 17 additions & 9 deletions .github/workflows/serverless_runtime_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,30 @@ on:
workflow_dispatch:

jobs:
build:
release_for_jdk8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Psnapshot,8-snapshot
working-directory: sofa-serverless-runtime
run: mvn clean install -DskipTests -B -U -e && sh ./check_format.sh
release:
needs: build
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

release_for_jdk17:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -40,9 +48,9 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Psnapshot,jakarta-snapshot
run: mvn --batch-mode deploy -DskipTests -Psnapshot,17-snapshot
working-directory: sofa-serverless-runtime
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ docs/resources/
docs/node_modules/
docs/package-lock.json
docs/.hugo_build.lock
docs/public
*/coverage.out
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)
![Maven Central](https://img.shields.io/maven-central/v/com.alipay.sofa.serverless/sofa-serverless-runtime)

SOFAServerless 官网https://sofaserverless.netlify.app/
完整产品介绍欢迎查阅 [SOFAServerless 官网](https://sofaserverless.gitee.io/home/)

<br/>

Welcome to SOFAServerless open source comminity. SOFAServerless is a modularization application architecture patterns for company business rapid development, operation, evolution and cooperation with low cost. Please watch us or join us in DingDing Group: 24970018417 .

欢迎来到 SOFAServerless 开源社区。SOFAServerless 是一种模块化的应用架构模式,能够帮助大中小企业低成本地实现极速研发、运维、微服务演进和人员协作,从而为企业实现降本增效。欢迎加入钉钉群关注我们或者与我们一起共建面向普通应用低成本接入的 Serverless 解决方案。钉钉群号:24970018417 。


Expand Down
14 changes: 13 additions & 1 deletion arkctl/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
test:
go test ./...
go test ./...

.PHONY: test
test: fmt vet ## Run tests.
go test ./... -coverprofile=coverage.out

.PHONY: fmt
fmt: ## Run go fmt against code.
go fmt ./...

.PHONY: vet
vet: ## Run go vet against code.
go vet ./...
Loading

0 comments on commit c84423e

Please sign in to comment.