-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from splitio/release_action
add release action + some more UT coverage
- Loading branch information
Showing
84 changed files
with
3,819 additions
and
1,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }} | ||
|
@@ -16,16 +17,20 @@ jobs: | |
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set VERSION env | ||
run: echo "VERSION=$(cat splitio/version.go | grep 'Version =' | awk '{print $3}' | tr -d '"')" >> $GITHUB_ENV | ||
run: echo "VERSION=$(cat splitio/version.go | grep 'Version =' | awk '{print $4}' | tr -d '"')" >> $GITHUB_ENV | ||
|
||
- name: Version validation | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: mukunku/[email protected] | ||
id: checkTag | ||
with: | ||
tag: ${{ env.VERSION }} | ||
tag: v${{ env.VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -35,56 +40,46 @@ jobs: | |
with: | ||
script: core.setFailed('[ERROR] Tag already exists.') | ||
|
||
- name: Git tag | ||
if: ${{ github.event_name == 'push' }} | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ env.VERSION }} | ||
tag_prefix: '' | ||
|
||
- name: Setup Go version | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.19.1' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
go-version: '^1.20.7' | ||
|
||
- name: Build binaries for host machine | ||
run: make splitd splitcli | ||
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Cross build for GNU Linux & Darwin x amd64 & arm64 | ||
run: make binaries_release | ||
|
||
- name: Run tests | ||
run: make test | ||
- name: SonarQube Scan | ||
uses: SonarSource/[email protected] | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectBaseDir: . | ||
args: > | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.projectVersion=${{ env.VERSION }} | ||
- name: Git tag | ||
if: ${{ github.event_name == 'push' }} | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ env.VERSION }} | ||
tag_prefix: 'v' | ||
|
||
# - name: SonarQube Scan (Push) | ||
# if: matrix.version == '8.2' && github.event_name == 'push' | ||
# uses: SonarSource/[email protected] | ||
# env: | ||
# SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# projectBaseDir: . | ||
# args: > | ||
# -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
# -Dsonar.projectVersion=${{ env.VERSION }} | ||
# | ||
# - name: SonarQube Scan (Pull Request) | ||
# if: matrix.version == '8.2' && github.event_name == 'pull_request' | ||
# uses: SonarSource/[email protected] | ||
# env: | ||
# SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# projectBaseDir: . | ||
# args: > | ||
# -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
# -Dsonar.projectVersion=${{ env.VERSION }} | ||
# -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
# -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
# -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
name: splitd-${{ env.VERSION }} | ||
files: | | ||
splitd-darwin-amd64-${{ env.VERSION }}.bin | ||
splitd-darwin-arm-${{ env.VERSION }}.bin | ||
splitd-linux-amd64-${{ env.VERSION }}.bin | ||
splitd-linux-arm-${{ env.VERSION }}.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: unstable | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
push-docker-image: | ||
name: Build and Push Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to Artifactory | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: splitio-docker-dev.jfrog.io | ||
username: ${{ secrets.ARTIFACTORY_DOCKER_USER }} | ||
password: ${{ secrets.ARTIFACTORY_DOCKER_PASS }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get short hash | ||
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
|
||
- name: Docker Build and Push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: "infra/sidecar.Dockerfile" | ||
push: true | ||
tags: splitio-docker-dev.jfrog.io/splitd/sidecar:${{ env.SHORT_SHA }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1.0.1 (Sep 5, 2023): | ||
- Add support for .track | ||
- Fixed issue where impressions could take too long to evict even with the queue full | ||
- Fixed eviction on shutdown | ||
- Internal: bumped test covereage, bumped CI configuration & automated release logic, module configuration cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# splitd | ||
# splitd |
Oops, something went wrong.