-
Notifications
You must be signed in to change notification settings - Fork 1.9k
tests: setup GitHub Actions to replace Travis #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
04bd2db
[WIP] GitHub Actions
Salakar 7fb88a8
Update main.yml
Salakar c061107
Update main.yml
Salakar 06da8a5
eslint report command
Salakar ee6ff2f
Update main.yml
Salakar bffdd57
Merge branch '@salakar/gh-actions' of https://github.com/NodeRedis/no…
Salakar 2131e21
-
Salakar d94f073
-
Salakar c17f511
Update benchmark.yml
Salakar d05053e
Update benchmark.yml
Salakar 9193d01
Update benchmark.yml
Salakar 60e36cd
-
Salakar ea2a507
-
Salakar e058c41
-
Salakar 7c8c623
-
Salakar a78db37
-
Salakar f176f8a
-
Salakar e951b3b
-
Salakar ad71efd
-
Salakar 17fe1c6
-
Salakar 1e22f27
-
Salakar e282434
-
Salakar dc1692e
-
Salakar 588b55d
-
Salakar d14b936
-
Salakar 409b36c
-
Salakar 82be137
-
Salakar 8116825
-
Salakar d644b63
-
Salakar 86a1b0f
-
Salakar 204e7b9
-
Salakar 980cbbe
-
Salakar 3343a98
-
Salakar ce4d200
-
Salakar 837e954
-
Salakar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -102,6 +102,7 @@ rules: | |
| globals: | ||
| it: true | ||
| describe: true | ||
| xdescribe: true | ||
| before: true | ||
| after: true | ||
| beforeEach: true | ||
|
|
||
This file contains hidden or 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,38 @@ | ||
| name: Benchmarking | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| benchmark: | ||
| name: Benchmark | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node-version: [8.x, 10.x, 12.x] | ||
| redis-version: [5] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Setup Redis | ||
| uses: shogo82148/actions-setup-redis@v1.0.1 | ||
| with: | ||
| redis-version: ${{ matrix.redis-version }} | ||
| auto-start: "true" | ||
|
|
||
| - run: npm i --no-audit --prefer-offline | ||
| - name: Run Benchmark | ||
| run: npm run benchmark > benchmark-output.txt && cat benchmark-output.txt | ||
| - name: Upload Benchmark Result | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: benchmark-output.txt | ||
| path: benchmark-output.txt |
This file contains hidden or 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,31 @@ | ||
| name: Linting | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| eslint: | ||
| name: ESLint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| with: | ||
| fetch-depth: 1 | ||
| - uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: 12 | ||
| - run: npm i --no-audit --prefer-offline | ||
| - name: Test Code Linting | ||
| run: npm run lint | ||
| - name: Save Code Linting Report JSON | ||
| run: npm run lint:report | ||
| continue-on-error: true | ||
| - name: Annotate Code Linting Results | ||
| uses: ataylorme/eslint-annotate-action@1.0.4 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| report-json: "eslint-report.json" | ||
| - name: Upload ESLint report | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: eslint-report.json | ||
| path: eslint-report.json |
This file contains hidden or 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,52 @@ | ||
| name: Tests | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| testing: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node-version: [6.x, 8.x, 10.x, 12.x] | ||
| redis-version: [4.x, 5.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Setup Redis | ||
| uses: shogo82148/actions-setup-redis@v1.0.1 | ||
| with: | ||
| redis-version: ${{ matrix.redis-version }} | ||
| auto-start: "false" | ||
|
|
||
| - name: Disable IPv6 | ||
| run: sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; | ||
|
|
||
| - name: Setup Stunnel | ||
| run: sudo apt-get install stunnel4 | ||
|
|
||
| - name: Install Packages | ||
| run: npm i --no-audit --prefer-offline | ||
|
|
||
| - name: Run Tests | ||
| run: npm test | ||
|
|
||
| - name: Submit Coverage | ||
| run: npm run coveralls | ||
| env: | ||
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
|
|
||
| - name: Upload Coverage Report | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: coverage | ||
| path: coverage |
This file contains hidden or 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,49 @@ | ||
| name: Tests Windows | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| testing-windows: | ||
| name: Test Windows | ||
| runs-on: windows-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node-version: [6.x, 8.x, 10.x, 12.x] | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Install Redis | ||
| uses: crazy-max/ghaction-chocolatey@v1 | ||
| with: | ||
| args: install redis-64 --no-progress | ||
|
|
||
| - name: Start Redis | ||
| run: | | ||
| redis-server --service-install | ||
| redis-server --service-start | ||
| redis-cli config set stop-writes-on-bgsave-error no | ||
|
|
||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Install Packages | ||
| run: npm i --no-audit --prefer-offline | ||
|
|
||
| - name: Run Tests | ||
| run: npm test | ||
|
|
||
| - name: Submit Coverage | ||
| run: npm run coveralls | ||
| env: | ||
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
|
|
||
| - name: Upload Coverage Report | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: coverage | ||
| path: coverage |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -14,3 +14,4 @@ package-lock.json | |
| # VisualStudioCode IDEs | ||
| .vscode | ||
| .vs | ||
| eslint-report.json | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -19,3 +19,4 @@ CODE_OF_CONDUCT.md | |
| appveyor.yml | ||
| package-lock.json | ||
| .prettierrc | ||
| eslint-report.json | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Salakar I guess this is an issue with Redis itself on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, it was consistent across all Node versions and only occured on Windows.
I did make a note of one strange behaviour though, it only started showing up on the newer Windows version Server 2019, didn't show on 2018 as far as I remember.
I have a todo already to try repro on my Windows box over the weekend, so will let you know the outcome here.