Skip to content

Commit cba9916

Browse files
authored
chore: combined and renamed ci jobs (#700)
1 parent c4ad9a8 commit cba9916

File tree

2 files changed

+93
-64
lines changed

2 files changed

+93
-64
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,12 @@ name: CI
55
on: [push, pull_request]
66

77
jobs:
8-
run-eslint:
9-
name: Lint source files with ESLint
10-
runs-on: ubuntu-latest
8+
# TODO: check project builds/compiles correctly, maybe with tsc TypeScript compiler?
119

12-
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
15-
with:
16-
node-version: 18
17-
- run: npm ci
18-
- name: Run ESLint
19-
run: >
20-
npx eslint
21-
.
22-
--config
23-
.eslintrc.yaml
24-
--ignore-path
25-
.eslintignore
10+
# TODO: add tests including coverage
2611

27-
run-prettier:
28-
name: Lint source files with Prettier
12+
lint_files:
13+
name: Lint source files
2914
runs-on: ubuntu-latest
3015

3116
steps:
@@ -34,16 +19,25 @@ jobs:
3419
with:
3520
node-version: 18
3621
- run: npm ci
37-
- run: >
22+
- name: Lint source files with Prettier
23+
run: >
3824
npx prettier --check
3925
.
4026
--config
4127
.prettierrc.yaml
4228
--ignore-path
4329
.prettierignore
30+
- name: Lint source files with ESLint
31+
run: >
32+
npx eslint
33+
.
34+
--config
35+
.eslintrc.yaml
36+
--ignore-path
37+
.eslintignore
4438
45-
run-npm-audit:
46-
name: Scan for known vulnerabilities in dependencies with npm audit
39+
check-npm-dependencies:
40+
name: Check npm dependencies
4741
runs-on: ubuntu-latest
4842

4943
steps:
@@ -52,41 +46,43 @@ jobs:
5246
with:
5347
node-version: 18
5448
- run: npm ci
55-
- run: >
49+
- name: Scan for known vulnerabilities in dependencies with npm audit
50+
run: >
5651
npm audit
5752
--audit-level
5853
critical
59-
60-
run-npm-depcheck:
61-
name: Check for unused and missing dependencies with depcheck
62-
runs-on: ubuntu-latest
63-
64-
steps:
65-
- uses: actions/checkout@v3
66-
- uses: actions/setup-node@v3
67-
with:
68-
node-version: 18
69-
- run: npm ci
70-
- run: >
54+
- name: Check for unused and missing dependencies with depcheck
55+
run: >
7156
npx depcheck
7257
--ignores
7358
typescript,prettier
59+
- name: Check for outdated packages with npm outdated
60+
run: npm outdated
61+
- name: Check for outdated packages with npm-check-updates
62+
run: npx npm-check-updates
7463

75-
run-npm-outdated:
76-
name: Check for outdated packages with npm outdated and npm-check-updates
64+
find_todos:
65+
name: Search for TODOs etc
7766
runs-on: ubuntu-latest
78-
7967
steps:
8068
- uses: actions/checkout@v3
81-
- uses: actions/setup-node@v3
82-
with:
83-
node-version: 18
84-
- run: npm ci
85-
- run: npm outdated
86-
- run: npx npm-check-updates
69+
- name: Search for TODO, FIXME, and BUG statements in source files
70+
run: >
71+
if grep
72+
--recursive
73+
--extended-regexp
74+
--with-filename
75+
--line-number
76+
--color=always
77+
"TODO|FIXME|BUG"
78+
./src;
79+
then exit 1;
80+
else
81+
echo "No TODO, FIXME, or BUG statements found in source files.";
82+
fi
8783
8884
typos_spell_check:
89-
name: Spell Check with Typos
85+
name: Check spelling with typos
9086
runs-on: ubuntu-latest
9187

9288
steps:
@@ -96,15 +92,25 @@ jobs:
9692
with:
9793
config: .typos.toml
9894

95+
lint_markdown_files:
96+
name: Lint Markdown files
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- uses: actions/checkout@v3
101+
- uses: articulate/actions-markdownlint@v1
102+
with:
103+
files: '*.md'
104+
ignore: '**/node_modules'
105+
99106
commitlint:
100-
name: Check the commit conforms to the Conventional Commits specification with commitlint
107+
name: Enforce Conventional Commits
101108
runs-on: ubuntu-latest
102109

103110
steps:
104111
- uses: actions/checkout@v3
105-
- uses: wagoid/commitlint-github-action@v5
112+
- name: Check the commits conform to the Conventional Commits specification with commitlint
113+
uses: wagoid/commitlint-github-action@v5
106114

107115
# TODO: check commits squashed into one (i.e. all changes in a PR are in one commit after last one in primary branch)
108-
# TODO: use release-please to increment version number, update changelog, and publish releases automatically if CI passes
109-
# TODO: check project builds/compiles correctly
110-
# TODO: add tests including coverage
116+
# TODO: use release-please to increment version number, update changelog, and publish releases automatically if CI passes

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,57 @@
11
# React Native Dropdown Picker 5.x
22

3+
## Screenshots
4+
35
<p float="left">
46
<img src="https://user-images.githubusercontent.com/56504893/116790110-e0b36880-aac7-11eb-9ebd-196acee64f7a.png" width="270" alt="Screenshot">
57
<img src="https://user-images.githubusercontent.com/56504893/116789802-faec4700-aac5-11eb-837b-86f18cbfcf3d.png" width="270" alt="Screenshot">
68
<img src="https://user-images.githubusercontent.com/56504893/116789839-2c651280-aac6-11eb-99e0-b43b608ed8c7.png" width="270" alt="Screenshot">
79
</p>
810

9-
The example in the screenshots: https://snack.expo.dev/8mHmLfcZf
11+
The above screenshots are taken from the following
12+
example: [https://snack.expo.dev/8mHmLfcZf](https://snack.expo.dev/8mHmLfcZf)
13+
14+
## Documentation
1015

11-
# Documentation
12-
**Visit https://hossein-zare.github.io/react-native-dropdown-picker-website/**
16+
The docs can be read
17+
at: [https://hossein-zare.github.io/react-native-dropdown-picker-website](https://hossein-zare.github.io/react-native-dropdown-picker-website)
1318

14-
# Merge and Release Process
19+
## Merge and Release Process
1520

16-
## Branches in use
21+
### Branches in use
1722

18-
### Development
23+
#### Development
1924

20-
PRs should be made against and merged into the [`dev-5.x`](https://github.com/hossein-zare/react-native-dropdown-picker) branch, which is set as the `default` branch on github.
25+
PRs should be made against and merged into
26+
the [`dev-5.x`](https://github.com/hossein-zare/react-native-dropdown-picker)
27+
branch, which is set as the `default` branch on GitHub.
2128

22-
### Release
29+
#### Release
2330

24-
Releases are currently made from the [`5.x`](https://github.com/hossein-zare/react-native-dropdown-picker/tree/5.x) branch.
31+
Releases are currently made from
32+
the [`5.x`](https://github.com/hossein-zare/react-native-dropdown-picker/tree/5.x)
33+
branch.
2534

26-
## Release Process
35+
### Release Process
2736

2837
To make a new release, follow these steps:
2938

30-
* Verify the development branch has all the changes desired in a release and works well
31-
* Make and merge a final PR into development branch that increments the version number in `package.json`
39+
* Verify the development branch has all the changes desired in the release and
40+
works well
41+
* Use `npm pack` to test the new version of the library locally and check it
42+
works correctly;
43+
see [https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e)
44+
* Make and merge a final PR into the development branch that increments the
45+
version number in `package.json`
3246
* Make and merge a PR from the development branch to the release branch
33-
* Using the GitHub web UI, draft a new release using tag name `vx.x.x` (replace the `x` values as appropriate of course), with the release branch as the target, with release name `vx.x.x` (again, with appropriate numbers in place of `x` of course)
34-
* Verify in the GitHub Actions panel for the repository that NPM publish succeeded
47+
* Using the GitHub web UI, draft a new release using the tag name `vx.x.x`
48+
(replace the `x` values as appropriate). Use the release branch as the
49+
target, with the release name being `vx.x.x` (again, with appropriate
50+
numbers in place of `x`)
51+
* Verify in the GitHub Actions panel for the repository that `npm publish`
52+
succeeded
53+
54+
[//]: # (TODO: make templates for pull requests and issues, and CONTRIBUTING.md
55+
include check people read docs and past issues before submitting new issues
56+
ensure PRs tested with npm pack: https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e
57+
)

0 commit comments

Comments
 (0)