Skip to content

Commit

Permalink
feat: reenable CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Aug 16, 2023
1 parent a29d448 commit 2a9a44c
Showing 1 changed file with 88 additions and 88 deletions.
176 changes: 88 additions & 88 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,101 +9,101 @@ on:

name: Main
jobs:
# Pr:
# if: github.event_name == 'pull_request'
# uses: formancehq/gh-workflows/.github/workflows/pr-style.yml@main
#
# Test_postgres:
# name: 'Test with PostgreSQL'
# 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 tests
# run: task tests
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: false # optional (default = false)
# verbose: true # optional (default = false)
#
# Test_sqlite:
# uses: formancehq/gh-workflows/.github/workflows/golang-test.yml@main
#
Pr:
if: github.event_name == 'pull_request'
uses: formancehq/gh-workflows/.github/workflows/pr-style.yml@main

Test_postgres:
name: 'Test with PostgreSQL'
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 tests
run: task tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)

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

Control:
name: 'Control'
uses: ./.github/workflows/template_build-control.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
#
# GoReleaserBuild:
# needs:
# - Control
# - Test_sqlite
# - Test_postgres
# if: github.event_name != 'release'
# name: 'GoReleaser Build'
# uses: ./.github/workflows/template_goreleaser-build.yaml
# secrets:
# NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}
#
# GoReleaserRelease:
# needs:
# - Control
# - Test_sqlite
# - Test_postgres
# if: github.event_name == 'release'
# name: 'GoReleaser Release'
# uses: ./.github/workflows/template_goreleaser-release.yaml
# secrets:
# NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}
# FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
#
# SdkGenerate:
# needs:
# - GoReleaserBuild
# uses: ./.github/workflows/template_sdk-generate.yaml
# secrets:
# NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
#
# SdkPublish:
# needs:
# - GoReleaserRelease
# uses: ./.github/workflows/template_sdk-publish.yaml
# with:
# VERSION: ${{ github.event.release.tag_name }}
# secrets:
# NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
#
# DockerRelease:
# needs:
# - Control
# - Test_sqlite
# - Test_postgres
# if: github.event_name == 'release'
# uses: ./.github/workflows/template_docker.yaml
# with:
# VERSION: ${{ github.event.release.tag_name }}
# 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 }}

GoReleaserBuild:
needs:
- Control
- Test_sqlite
- Test_postgres
if: github.event_name != 'release'
name: 'GoReleaser Build'
uses: ./.github/workflows/template_goreleaser-build.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}

GoReleaserRelease:
needs:
- Control
- Test_sqlite
- Test_postgres
if: github.event_name == 'release'
name: 'GoReleaser Release'
uses: ./.github/workflows/template_goreleaser-release.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SEGMENT_WRITE_KEY_OSS: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}

SdkGenerate:
needs:
- GoReleaserBuild
uses: ./.github/workflows/template_sdk-generate.yaml
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}

SdkPublish:
needs:
- GoReleaserRelease
uses: ./.github/workflows/template_sdk-publish.yaml
with:
VERSION: ${{ github.event.release.tag_name }}
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}

DockerRelease:
needs:
- Control
- Test_sqlite
- Test_postgres
if: github.event_name == 'release'
uses: ./.github/workflows/template_docker.yaml
with:
VERSION: ${{ github.event.release.tag_name }}
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 }}

DockerBranch:
# needs:
# - Control
# - Test_sqlite
# - Test_postgres
needs:
- Control
- Test_sqlite
- Test_postgres
if: github.event_name != 'release'
uses: ./.github/workflows/template_docker.yaml
with:
Expand Down

0 comments on commit 2a9a44c

Please sign in to comment.