Skip to content

Commit

Permalink
ci: Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord committed Apr 19, 2023
1 parent ab366e3 commit 0faa2e9
Showing 1 changed file with 2 additions and 71 deletions.
73 changes: 2 additions & 71 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,15 @@ jobs:
if: github.event_name == 'pull_request'
uses: formancehq/gh-workflows/.github/workflows/pr-style.yml@main

Lint:
uses: formancehq/gh-workflows/.github/workflows/golang-lint.yml@main

Control:
name: 'Control'
needs:
- Lint
uses: ./.github/workflows/template_build-control.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}

Test_postgres:
uses: formancehq/gh-workflows/.github/workflows/golang-test-postgres.yml@main

Test_sqlite:
uses: formancehq/gh-workflows/.github/workflows/golang-test.yml@main

Bench:
runs-on: ubuntu-latest
steps:
- name: Install task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: Run ledger package benchmarks
run: task install:perf bench PKG=./pkg/ledger RUN=BenchmarkLedger

GoReleaserBuild:
if: github.event_name != 'release'
name: 'GoReleaser Build'
needs:
- Control
- Test_sqlite
- Test_postgres
uses: ./.github/workflows/template_goreleaser-build.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
Expand All @@ -60,10 +30,6 @@ jobs:
GoReleaserRelease:
if: github.event_name == 'release'
name: 'GoReleaser Release'
needs:
- Control
- Test_sqlite
- Test_postgres
uses: ./.github/workflows/template_goreleaser-release.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
Expand All @@ -87,12 +53,8 @@ jobs:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}

DockerRelease:
if: github.event_name == 'release'
if: github.event_name == 'rxzelease'
uses: ./.github/workflows/template_docker.yaml
needs:
- Control
- Test_sqlite
- Test_postgres
with:
VERSION: ${{ github.event.release.tag_name }}
APP_SHA: ${{ github.sha }}
Expand All @@ -104,41 +66,10 @@ jobs:
DockerBranch:
if: github.event_name != 'release'
uses: ./.github/workflows/template_docker.yaml
needs:
- Control
- Test_sqlite
- Test_postgres
with:
VERSION: develop
APP_SHA: ${{ github.sha }}
RELEASE: ${{ github.event.action }}
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}

# Check-pkgs:
# if: github.event_name == 'release'
# runs-on: ubuntu-latest
# env:
# DOCKER_CLI_EXPERIMENTAL: "enabled"
# needs:
# - GoReleaserRelease
# strategy:
# matrix:
# format: [ deb, rpm ]
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: arduino/setup-task@v1
# with:
# version: 3.x
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: docker/setup-qemu-action@v1
# - uses: actions/cache@v2
# with:
# path: |
# ./dist/*.deb
# ./dist/*.rpm
# key: ${{ runner.os }}-go-${{ hashFiles('**/*.go') }}-${{ hashFiles('**/go.sum') }}
# - run: task goreleaser:test:${{ matrix.format }}
SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}

0 comments on commit 0faa2e9

Please sign in to comment.