Skip to content

Commit

Permalink
chore: update workflows (#1065)
Browse files Browse the repository at this point in the history
* fix: add workflows

* fix: add d2 style

* fix: formatting

* fix: formatting
  • Loading branch information
janhenrikoverland authored Jun 8, 2020
1 parent 96b9452 commit c2a2ce4
Show file tree
Hide file tree
Showing 7 changed files with 1,903 additions and 61 deletions.
4 changes: 4 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
titleOnly: true
commitsOnly: false
titleAndCommits: false
allowMergeCommits: true
47 changes: 47 additions & 0 deletions .github/workflows/node-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'dhis2: publish (node)'

on:
push:
branches:
- master
- next
- next-major
- alpha
- beta
- '[0-9]+.x'
- '[0-9]+.x.x'
- '[0-9]+.[0-9]+.x'

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: '[email protected]'
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}}
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}

jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
with:
token: ${{env.GH_TOKEN}}
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Publish to NPM
run: npx @dhis2/cli-utils release --publish npm
env:
CI: true
30 changes: 30 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'dhis2: test (node)'

on: push

jobs:
unit:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install
run: yarn install --frozen-lockfile

- name: Lint
run: |
yarn d2-style js check
yarn d2-style text check
# Build is required by plugin tests below
- name: Build
run: yarn build

- name: Test
run: yarn test
env:
CI: true
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ $ yarn prettier-ci
$ yarn build
```


#### Manual testing with Netlify

This repo is configured to deploy all branches to netlify. This makes it simple to share a running implementation with others (e.g., tester, product manager, ux, fellow developers) prior
Expand All @@ -103,14 +102,14 @@ All netlfiy deployments run against play.dhis2.org/dev, so in order to use them,

The master branch is always available at:

```https://dhis2-data-visualizer.netlify.com```
`https://dhis2-data-visualizer.netlify.com`

Branches are available at (replace `/` and other special characters in `{branchname}` with `-`):

```https://{branchname}--dhis2-data-visualizer.netlify.com```
`https://{branchname}--dhis2-data-visualizer.netlify.com`

Pull requests (I.E. #209) are available at:

```https://deploy-preview-209--dhis2-data-visualizer.netlify.com```
`https://deploy-preview-209--dhis2-data-visualizer.netlify.com`

Netlify will also add a status check to each PR which links directly to the PR deployment.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"license": "BSD-3-Clause",
"devDependencies": {
"@dhis2/cli-style": "^7.0.0",
"@dhis2/d2-i18n-extract": "^1.0.8",
"@dhis2/d2-i18n-generate": "^1.1.1",
"babel-preset-env": "^1.6.1",
Expand Down
Loading

0 comments on commit c2a2ce4

Please sign in to comment.