-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup GitHub Actions for the monorepo
- Loading branch information
Showing
6 changed files
with
272 additions
and
0 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,8 @@ | ||
{ | ||
"branchPrefix": "renovate-fix/", | ||
"gitAuthor": "Renovate Bot <[email protected]>", | ||
"platform": "github", | ||
"repositories": [ | ||
"solita/etp-core" | ||
] | ||
} |
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,76 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-core/etp-backend | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Prepare java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1273 | ||
- name: Build | ||
run: clojure -M:uberjar | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-core/etp-backend | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Prepare java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1273 | ||
- name: Lint | ||
run: clojure -M:lint --fail-level error | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Prepare java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1273 | ||
- name: Install Libreoffice | ||
run: sudo apt-get update && sudo apt-get install libreoffice | ||
- name: Docker Compose | ||
working-directory: etp-core/docker | ||
run: ./start.sh | ||
- name: Test | ||
working-directory: etp-core/etp-backend | ||
run: clojure -M:dev:test-ci | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: success() || failure() | ||
with: | ||
report_paths: 'etp-backend/target/test.xml' |
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,92 @@ | ||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-front | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-front | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm test | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-front | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run check-format | ||
|
||
storybook: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-front | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run storybook:build |
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 @@ | ||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-public | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm run check-format | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-public | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run check-format |
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,24 @@ | ||
name: nvd-clojure | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * 1' | ||
|
||
jobs: | ||
nvd: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: etp-core/etp-backend | ||
container: | ||
image: clojure:openjdk-17-tools-deps | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run nvd | ||
run: ./nvd.sh | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: success() || failure() | ||
with: | ||
report_paths: 'etp-backend/target/nvd/dependency-check-junit.xml' |
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,19 @@ | ||
name: renovate | ||
|
||
on: | ||
schedule: | ||
- cron: '10 0/1 * * *' # Start at ten past to avoid rush hour | ||
|
||
jobs: | ||
renovate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Self-hosted Renovate | ||
uses: renovatebot/[email protected] | ||
with: | ||
token: ${{ secrets.RENOVATE_TOKEN }} | ||
configurationFile: .github/renovate-bot-config.json | ||
env: | ||
LOG_LEVEL: 'debug' |