Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Aug 14, 2024
1 parent 0318e85 commit c61897f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Lint Commit Messages
name: commitlint

on: [pull_request]

permissions:
Expand All @@ -9,5 +10,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Lint Commit Messages
uses: wagoid/commitlint-github-action@v5
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: deploy

on:
push:
branches:
- "master"
- "hotfix/**"

jobs:
binary:
Expand All @@ -12,7 +12,6 @@ jobs:
max-parallel: 3
matrix:
os: [ windows-latest, ubuntu-20.04, ubuntu-22.04]

steps:
- name: 🐙 Checkout GitHub repo (+ download lfs dependencies)
uses: actions/checkout@v4
Expand Down
39 changes: 27 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: main
on:
push:
branches:
- "**"

# If a workflow is skipped due to path filtering, branch filtering or a commit message,
# then checks associated with that workflow will remain in a "Pending" state.
# A pull request that requires those checks to be successful will be blocked from merging.
# So we use conditions to control job execution (`if: ...`) instead of `pull_request` event parameters.
on: [pull_request]

jobs:

################################################################
## Python
################################################################

python-lint:
runs-on: ubuntu-20.04
steps:
- name: Checkout github repo (+ download lfs dependencies)
- name: Checkout GitHub repo (+ download lfs dependencies)
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -39,9 +46,8 @@ jobs:
max-parallel: 9
matrix:
os: [windows-latest, ubuntu-20.04]

steps:
- name: Checkout github repo (+ download lfs dependencies)
- name: Checkout GitHub repo (+ download lfs dependencies)
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -64,11 +70,15 @@ jobs:
with:
name: python-code-coverage-report
path: coverage.xml

################################################################
## npm
################################################################

npm-setup:
runs-on: ubuntu-20.04
steps:
- name: Checkout github repo
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -88,10 +98,11 @@ jobs:
working-directory: webapp

npm-lint:
if: ${{ contains(github.event.pull_request.files.*.filename, 'webapp/') }}
needs: npm-setup
runs-on: ubuntu-20.04
steps:
- name: Checkout github repo
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -111,7 +122,7 @@ jobs:
needs: npm-setup
runs-on: ubuntu-20.04
steps:
- name: Checkout github repo
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -131,7 +142,7 @@ jobs:
needs: npm-setup
runs-on: ubuntu-20.04
steps:
- name: Checkout github repo
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -150,6 +161,10 @@ jobs:
NODE_OPTIONS: --max-old-space-size=8192
DISABLE_ESLINT_PLUGIN: true

################################################################
## SonarCloud
################################################################

sonarcloud:
runs-on: ubuntu-20.04
needs: [python-test, npm-test]
Expand All @@ -163,4 +178,4 @@ jobs:
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/worker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: worker

on:
push:
branches:
Expand All @@ -8,7 +9,6 @@ on:
jobs:
binary:
runs-on: windows-latest

steps:
- name: 🐙 Checkout GitHub repo (+ download lfs dependencies)
uses: actions/checkout@v4
Expand Down

0 comments on commit c61897f

Please sign in to comment.