Skip to content

Commit

Permalink
split into multiple workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-the-coder committed Mar 4, 2024
1 parent d353c15 commit c9d22fc
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 71 deletions.
78 changes: 7 additions & 71 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,23 @@
name: CI
# This workflow is triggered on pushes & pull requests
# This workflow is triggered on pushes
on:
pull_request:
branches:
- main
- sandbox
- beta
push:
branches: [ main, beta ]
# Publish semver tags as releases.
release:
types: [published]
jobs:
test-frontend:
name: Test Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: test
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Test Frontend
run: |
make test-frontend-coverage
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ${{ github.workspace }}/frontend/coverage/fastenhealth/lcov.info
retention-days: 1
test-backend:
name: Test Backend
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
env:
STATIC: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test Backend
run: |
go install github.com/golang/mock/mockgen@v1.6.0
go generate ./...
make test-backend-coverage
CGO_ENABLED=0 go build -buildvcs=false ./backend/cmd/fasten/
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ${{ github.workspace }}/backend-coverage.txt
retention-days: 1
test:
uses: ${{ github.workspace }}/.github/workflows/development.yml
name: Test
test-coverage:
name: Test Coverage Upload
needs:
- test-backend
- test-frontend
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Download coverage reports
uses: actions/download-artifact@v3
with:
Expand All @@ -72,32 +29,11 @@ jobs:
flags: unittests
fail_ci_if_error: true
verbose: true
test-storybook:
name: Build Storybook
on:
pull_request:
- main
- sandbox
- beta
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: test
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Build Storybook
run: |
make build-storybook
storybook:
name: Storybook Upload
on:
push:
branches: [ main, beta ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: cd frontend && yarn install
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Development

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

jobs:
test-frontend:
name: Test Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: test
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Test Frontend
run: |
make test-frontend-coverage
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ${{ github.workspace }}/frontend/coverage/fastenhealth/lcov.info
retention-days: 1
test-backend:
name: Test Backend
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
env:
STATIC: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Backend
run: |
go install github.com/golang/mock/mockgen@v1.6.0
go generate ./...
make test-backend-coverage
CGO_ENABLED=0 go build -buildvcs=false ./backend/cmd/fasten/
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ${{ github.workspace }}/backend-coverage.txt
retention-days: 1
compile-storybook:
name: Compile Storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
make build-storybook

0 comments on commit c9d22fc

Please sign in to comment.