-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
395 additions
and
125 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master, main ] | ||
|
||
jobs: | ||
set-deps-dotnet-poop-here: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/dotnet/sdk:6.0 | ||
outputs: | ||
semVer: ${{ steps.gitversion.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.15 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Set SemVer Version | ||
uses: gittools/actions/gitversion/execute@v0.9.15 | ||
id: gitversion | ||
|
||
- name: echo VERSIONS | ||
run: | | ||
echo "REVISION -> $GITHUB_SHA" | ||
echo "VERSION -> $GITVERSION_SEMVER" | ||
test: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: golang:1.19-bullseye | ||
needs: set-deps-dotnet-poop-here | ||
env: | ||
SEMVER: ${{ needs.set-deps-dotnet-poop-here.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install deps | ||
run: | | ||
apt update && apt install jq -y | ||
make REVISION=$GITHUB_SHA install | ||
- name: make test | ||
run: | | ||
make REVISION=$GITHUB_SHA test | ||
- name: Publish Junit style Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/report-junit.xml' | ||
- name: Analyze with SonarCloud | ||
# You can pin the exact commit or the version. | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | ||
with: | ||
# Additional arguments for the sonarcloud scanner | ||
args: | ||
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) | ||
# mandatory | ||
-Dsonar.projectVersion=$SEMVER | ||
-Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out | ||
-X |
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,64 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ master, main ] | ||
|
||
jobs: | ||
set-deps-dotnet-poop-here: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/dotnet/sdk:6.0 | ||
outputs: | ||
semVer: ${{ steps.gitversion.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.15 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Set SemVer Version | ||
uses: gittools/actions/gitversion/execute@v0.9.15 | ||
id: gitversion | ||
|
||
- name: echo VERSIONS | ||
run: | | ||
echo "REVISION -> $GITHUB_SHA" | ||
echo "VERSION -> $GITVERSION_SEMVER" | ||
pr: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: golang:1.19-bullseye | ||
needs: set-deps-dotnet-poop-here | ||
env: | ||
REVISION: $GITHUB_SHA | ||
SEMVER: ${{ needs.set-deps-dotnet-poop-here.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install deps | ||
run: | | ||
apt update && apt install jq -y | ||
make REVISION=$GITHUB_SHA install | ||
- name: make test | ||
run: | | ||
make REVISION=$GITHUB_SHA test | ||
- name: Publish Junit style Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/report-junit.xml' | ||
- name: Analyze with SonarCloud | ||
# You can pin the exact commit or the version. | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | ||
with: | ||
# Additional arguments for the sonarcloud scanner | ||
args: | ||
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) | ||
# mandatory | ||
-Dsonar.projectVersion=$SEMVER | ||
-Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out |
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,53 @@ | ||
name: release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['CI'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
set-deps-dotnet-poop-here: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
container: | ||
image: mcr.microsoft.com/dotnet/sdk:6.0 | ||
outputs: | ||
semVer: ${{ steps.gitversion.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.15 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Set SemVer Version | ||
uses: gittools/actions/gitversion/execute@v0.9.15 | ||
id: gitversion | ||
|
||
- name: echo VERSIONS | ||
run: | | ||
echo "REVISION -> $GITHUB_SHA" | ||
echo "VERSION -> $GITVERSION_SEMVER" | ||
release: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: golang:1.19-bullseye | ||
env: | ||
FOO: Bar | ||
needs: set-deps-dotnet-poop-here | ||
env: | ||
SEMVER: ${{ needs.set-deps-dotnet-poop-here.outputs.semVer }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install deps | ||
run: | | ||
apt update && apt install jq -y | ||
make REVISION=$GITHUB_SHA install | ||
- name: release library | ||
run: make GIT_TAG=${SEMVER} REVISION=$GITHUB_SHA tag | ||
- name: release binary | ||
run: | | ||
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} build | ||
make REVISION=$GITHUB_SHA GIT_TAG=${SEMVER} PAT=${{ secrets.GITHUB_TOKEN }} release |
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 |
---|---|---|
|
@@ -20,3 +20,4 @@ dist/ | |
|
||
# test | ||
.coverage | ||
.DS_Store |
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,11 @@ | ||
FROM debian:bullseye | ||
|
||
WORKDIR /seeder | ||
|
||
COPY dist/uiseeder-linux uiseeder | ||
COPY .ignore-paypal.yml paypal.yml | ||
|
||
# RUN apt-get update \ | ||
# && apt install -y libnss3 | ||
|
||
ENTRYPOINT [ "/seeder/uiseeder", "-i", "/seeder/paypal.yml" ] |
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
Oops, something went wrong.