forked from CMU-313/cmu-313-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from CMU-313/flow
Integration and Testing of Flow Static Analysis Tool
- Loading branch information
Showing
5 changed files
with
621 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ignore] | ||
.*/node_modules/.* | ||
.*/build/.* | ||
.*/public/.* | ||
.*/lib/.* | ||
.*/coverage/.* | ||
.*/tests/.* | ||
.*/types/.* | ||
.*/logs/.* | ||
.*/install/.* | ||
.*/loader.js | ||
.*/require-main.js | ||
.*/webpack.installer.js | ||
.*/commitlint.config.js | ||
.*/app.js | ||
.*/Gruntfile.js | ||
|
||
[include] | ||
./src | ||
|
||
[libs] | ||
|
||
[lints] | ||
untyped-type-import=error | ||
internal-type=error | ||
deprecated-type-bool=error | ||
|
||
[options] | ||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Flow Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- f24 | ||
workflow_call: # Usually called from deploy | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
checks: write # for coverallsapp/github-action to create new checks | ||
contents: read # for actions/checkout to fetch code | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_ENV: 'production' | ||
|
||
services: | ||
redis: | ||
image: 'redis:7.2.4' | ||
# Set health checks to wait until redis has started | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps port 6379 on service container to the host | ||
- 6379:6379 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: cp install/package.json package.json | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: NPM Install | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: Setup for Redis | ||
env: | ||
SETUP: >- | ||
{ | ||
"url": "http://127.0.0.1:4567/forum", | ||
"secret": "abcdef", | ||
"admin:username": "admin", | ||
"admin:email": "test@example.org", | ||
"admin:password": "hAN3Eg8W", | ||
"admin:password:confirm": "hAN3Eg8W", | ||
"database": "redis", | ||
"redis:host": "127.0.0.1", | ||
"redis:port": 6379, | ||
"redis:password": "", | ||
"redis:database": 0 | ||
} | ||
CI: >- | ||
{ | ||
"host": "127.0.0.1", | ||
"database": 1, | ||
"port": 6379 | ||
} | ||
run: | | ||
node app --setup="${SETUP}" --ci="${CI}" | ||
- name: Install Flow | ||
run: npm install --save-dev flow-bin | ||
|
||
- name: Run Flow | ||
run: npx flow check --all |
Oops, something went wrong.