Skip to content

CI #1

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 9 commits into from
Jul 20, 2021
Merged

CI #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Continuous Integration
on:
# branches pushed by collaborators
push:
branches:
- master
# pull request from non-collaborators
pull_request: {}
# nightly
schedule:
- cron: '0 0 * * *'
jobs:
build:
name: "Test: ${{ matrix.os }}, node ${{ matrix.node }}"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
node:
- 16
- 14
- 12
- 10
- 9
- '8'
- '7'
- '6'
- '4'
- '0.12'
# - '0.10'
steps:
# checkout code
- uses: actions/checkout@v2
# install node
- name: Use Node.js ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

# npm install with caching
- run: |
npm config set cache "$( node -p "process.cwd()" )/temp/npm-cache"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: temp/npm-cache
key: npm-cache-${{ matrix.os }} ${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
# restore-keys: npm-cache-${{ matrix.os }} ${{ matrix.node }}-
- run: npm install

# Run tests
- run: npm test
22 changes: 12 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function createMultiLineSourceMapWithSourcesContent() {

function compareStackTrace(sourceMap, source, expected) {
// Check once with a separate source map
fs.writeFileSync('.generated.js.map', sourceMap);
fs.writeFileSync('.generated.js.map', sourceMap.toString());
fs.writeFileSync('.generated.js', 'exports.test = function() {' +
source.join('\n') + '};//@ sourceMappingURL=.generated.js.map');
try {
Expand All @@ -113,7 +113,7 @@ function compareStackTrace(sourceMap, source, expected) {

function compareStdout(done, sourceMap, source, expected) {
fs.writeFileSync('.original.js', 'this is the original code');
fs.writeFileSync('.generated.js.map', sourceMap);
fs.writeFileSync('.generated.js.map', sourceMap.toString());
fs.writeFileSync('.generated.js', source.join('\n') +
'//@ sourceMappingURL=.generated.js.map');
child_process.exec('node ./.generated', function(error, stdout, stderr) {
Expand Down Expand Up @@ -616,7 +616,7 @@ it('handleUncaughtExceptions is true with existing listener', function(done) {
];

fs.writeFileSync('.original.js', 'this is the original code');
fs.writeFileSync('.generated.js.map', createSingleLineSourceMap());
fs.writeFileSync('.generated.js.map', createSingleLineSourceMap().toString());
fs.writeFileSync('.generated.js', source.join('\n'));

child_process.exec('node ./.generated', function(error, stdout, stderr) {
Expand Down