Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #186 from smartive-education/feature/workflows
Browse files Browse the repository at this point in the history
Feature/workflows
  • Loading branch information
webrooster authored Jun 20, 2023
2 parents a165a56 + 4e6d638 commit 528e683
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 34 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/commitlint.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
workflow_call:

jobs:
quality_checks:
uses: ./.github/workflows/quality_checks.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

tests:
uses: ./.github/workflows/test.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

release-and-deploy:
uses: ./.github/workflows/release.yml
needs: [quality_checks, tests]
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ZITADEL_CLIENT_ID: ${{ secrets.ZITADEL_CLIENT_ID }}
ZITADEL_ISSUER: ${{ secrets.ZITADEL_ISSUER }}
8 changes: 5 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: E2E Tests

on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_run:
workflows: ['CI']
branches: [main]
types:
- completed

jobs:
test:
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/quality_checks.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Code quality checks, dependency graph and build

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
workflow_call:
secrets:
NPM_TOKEN:
required: true

jobs:
quality:
quality-checks:
name: Code quality checks, dependency graph and build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -30,3 +30,12 @@ jobs:
run: npm run dep-graph:validate
- name: Run Build
run: npm run build

commitlint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
name: Release Mumble App

on:
push:
branches: ['main']
workflow_dispatch:
workflow_call:
secrets:
NPM_TOKEN:
required: true
HOST:
required: true
USERNAME:
required: true
PASSWORD:
required: true
ZITADEL_ISSUER:
required: true
ZITADEL_CLIENT_ID:
required: true

concurrency:
group: 'release'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Jest tests

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
workflow_call:
secrets:
NPM_TOKEN:
required: true

jobs:
testing-with-jest:
Expand Down
6 changes: 1 addition & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ export default function Page({
fallbackUsers: QwackerUserResponse;
fallbackUserLoggedIn: User;
}) {
console.log(
`Testing app-yeahyeahyeah deployment with terraform: ${new Date().toLocaleString('de-DE', {
timeZone: 'Europe/Zurich',
})} :-D`
);
console.log(`Testing workflows :-)`);
return (
<>
<NextSeo title={`${Content.seo.home.title}`} description={`${Content.seo.home.description}`} />
Expand Down

0 comments on commit 528e683

Please sign in to comment.