Skip to content

Commit

Permalink
feat: add new build and lint steps for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed May 8, 2021
1 parent 95b6a3f commit c6b6981
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,18 @@

---
name: Swift build
on:
pull_request:
branches:
- main
types: [ opened, edited, reopened, synchronize ]
paths:
- '**.swift'
jobs:
build:
name: Swift build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: build
run: swift build
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,18 @@
name: Commitlint
on:
pull_request:
branches: [ develop, main, release/*, release-* ]
types: [ opened, edited, reopened, synchronize ]

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v1
with:
configFile: lint-config.js
16 changes: 16 additions & 0 deletions lint-config.js
@@ -0,0 +1,16 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
parserPreset: {
parserOpts: {
issuePrefixes: ["[A-Z]{2,}-"],
},
},
rules: {
"references-empty": [0, "never"],
"header-max-length": [0, "always", 90],
"subject-empty": [0, "never"],
"type-empty": [2, "never"],
"footer-leading-blank": [0, "never"],
"scope-case": [0, "never"],
},
};

0 comments on commit c6b6981

Please sign in to comment.