generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(workflow): add a new workflow containing all checks (#145)
* chore(workflow): add a new workflow containing all checks * chore(workflow): do not shre node_modules between jobs * chore(workflow): build packages before testing * chore(workflow): add a workflow for publishing * chore(workflow): remove obsolete workflows * chore(workflow): remove automatic application of license check * chore(workflow) do not use parallel while testing * chore(workflow) do not use run with npx for licenses * chore(workflow) add new line to release.yaml * chore(workflow) add format check to ci workflow
- Loading branch information
Showing
15 changed files
with
685 additions
and
3,208 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
|
||
* @cloudoperators/greenhouse-frontend | ||
/packages/ui-components/ @cloudoperators/greenhouse-frontend @franzheidl | ||
* @cloudoperators/frontend-core | ||
/packages/ui-components/ @cloudoperators/frontend-core @franzheidl |
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,146 @@ | ||
name: CI Check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
install-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' # Specify the node version you need | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
reuse-compliance: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# https://github.com/fsfe/reuse-action | ||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@v3 | ||
|
||
license-headers: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Check License Header | ||
uses: apache/skywalking-eyes/[email protected] | ||
with: | ||
config: .github/licenserc.yaml | ||
mode: fix | ||
|
||
allowed-licenses: | ||
needs: install-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' # Specify the node version you need | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run Linter | ||
run: npm run check-licenses | ||
|
||
lint: | ||
needs: install-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' # Specify the node version you need | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Run Linter | ||
run: npm run lint | ||
|
||
format: | ||
needs: install-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' # Specify the node version you need | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Run Prettier | ||
run: npm run check-format | ||
|
||
test: | ||
needs: install-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' # Specify the node version you need | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install Dependencies | ||
run: npm ci && npm run build | ||
- name: Run Tests | ||
run: npm run test | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
publish: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.