diff --git a/.github/workflows/on_push_to_feature.yaml b/.github/workflows/manual_tests.yaml similarity index 98% rename from .github/workflows/on_push_to_feature.yaml rename to .github/workflows/manual_tests.yaml index 2bbb1af9..6b510b1b 100644 --- a/.github/workflows/on_push_to_feature.yaml +++ b/.github/workflows/manual_tests.yaml @@ -1,7 +1,7 @@ -name: Run tests +name: Manually run Test Suite on: - push: +# push: # branches: # - feature/** workflow_dispatch: diff --git a/.github/workflows/on_pr_to_main.yaml b/.github/workflows/pr.yaml similarity index 79% rename from .github/workflows/on_pr_to_main.yaml rename to .github/workflows/pr.yaml index 1f971554..2e568ee7 100644 --- a/.github/workflows/on_pr_to_main.yaml +++ b/.github/workflows/pr.yaml @@ -1,9 +1,11 @@ -name: Run integration tests +name: "Pull Request Action: Run Tests & Lint PR Title" on: pull_request: types: - opened + - edited + - synchronize branches: - main workflow_dispatch: @@ -58,3 +60,20 @@ jobs: #---------------------------------------------- - name: Run tests run: poetry run pytest tests + + lint-pr-title: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Commitlint + run: npm install --global @commitlint/{cli,config-conventional} + + - name: Lint PR Title + run: echo "${{ github.event.pull_request.title }}" | commitlint diff --git a/.releaserc.yaml b/.releaserc.yaml index 9fa0ebaf..78af9095 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -1,6 +1,19 @@ plugins: - '@semantic-release/commit-analyzer': - preset: - "angular" + preset: "angular" + releaseRules: + - type: "feat" + release: "minor" + - type: "fix" + release: "patch" + - type: "perf" + release: "patch" + - type: "docs" + release: "patch" + - type: "revert" + release: "patch" + - breaking: true + release: "major" - '@semantic-release/release-notes-generator' + - '@semantic-release/changelog' - '@semantic-release/github' diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..8567d51d --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = { extends: ["@commitlint/config-conventional"] }; \ No newline at end of file