Skip to content

Commit

Permalink
Merge pull request #1342 from dhis2/update-alpha
Browse files Browse the repository at this point in the history
chore: update alpha branch
  • Loading branch information
HendrikThePendric authored Mar 13, 2023
2 parents 99a2bfd + 8c371a6 commit ce16f9e
Show file tree
Hide file tree
Showing 135 changed files with 13,561 additions and 6,726 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ const { config } = require('@dhis2/cli-style')

module.exports = {
extends: [config.eslintReact],
plugins: ['react-hooks'],
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'import/extensions': 'off',
},
}
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Implements [LIBS-XXXX](https://dhis2.atlassian.net/browse/LIBS-XXXX)

---

### Key features

<!-- Remove if not applicable -->

1. _feature_

---

### Description

_text_

---

### Checklist

- [ ] Have written Documentation
- _If not needed, explain why, otherwise remove this bullet point_
- [ ] Has tests coverage
- _If not needed, explain why, otherwise remove this bullet point_

---

### Known issues

<!-- Remove if not applicable -->

- _issue_

---

### Screenshots

<!-- Remove if not applicable -->

_supporting text_
4 changes: 0 additions & 4 deletions .github/semantic.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/dhis2-deploy-netlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'dhis2: deploy (netlify)'

# Requirements:
#
# - Org secrets:
# DHIS2_BOT_NETLIFY_TOKEN
# DHIS2_BOT_GITHUB_TOKEN
# - Repo secrets:
# NETLIFY_SITE_ID
# - Customize the 'jobs.build.steps.netlify-deploy.publish-dir' property

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile

- run: |
yarn build
yarn docs:build
- uses: nwtgck/actions-netlify@v1.1
with:
production-branch: 'master'
production-deploy: true
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
deploy-message: 'Deploy documentation site from GitHub Actions'
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
publish-dir: 'dist'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
32 changes: 32 additions & 0 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'dhis2: verify (commits)'

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: JulienKode/pull-request-name-linter-action@v0.5.0
with:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v4
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
10 changes: 5 additions & 5 deletions .github/workflows/dhis2-verify-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -98,7 +98,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/cache@v2
id: yarn-cache
Expand All @@ -123,7 +123,7 @@ jobs:
token: ${{env.GH_TOKEN}}
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- uses: actions/download-artifact@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn d2-style check commit "$1"
4 changes: 4 additions & 0 deletions .hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn d2-style check --staged
15 changes: 0 additions & 15 deletions .huskyrc.js

This file was deleted.

Loading

0 comments on commit ce16f9e

Please sign in to comment.