Skip to content

Commit

Permalink
Merge branch 'master' into rmuller/better-errors-reutrning-this-from-…
Browse files Browse the repository at this point in the history
…internal-type
  • Loading branch information
RomainMuller authored Aug 10, 2020
2 parents 55240a8 + 2ee6f1e commit baeebbe
Show file tree
Hide file tree
Showing 736 changed files with 68,663 additions and 63,309 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@

# Github Linguist configuration (https://github.com/github/linguist)
yarn.lock linguidt-generated
*.snap linguist-generated
docs/** linguist-documentation
72 changes: 54 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ jobs:
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand All @@ -63,18 +66,26 @@ jobs:
${{ runner.os }}-
# Prepare dependencies and build
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |-
yarn install --frozen-lockfile
- name: Full Build
run: yarn build
- name: "Upload Artifact: built-tree"
run: |-
yarn build
- name: Prepare Artifact
run: |-
tar Jcvf ${{ runner.temp }}/built-tree.tar.xz \
--exclude='**/.env' \
--exclude='**/node_modules' \
--exclude='**/project/.m2/repository' \
--exclude-tag-all='pyenv.cfg' \
--directory=${{ github.workspace }} \
.
# Upload artifact (we'll tar it up to save time)
- name: 'Upload Artifact: built-tree'
uses: actions/upload-artifact@v2
with:
name: built-tree
path: |-
${{ github.workspace }}
!**/.env/**
!**/node_modules/**
!**/project/.m2/**
path: ${{ runner.temp }}/built-tree.tar.xz

create-release-package:
name: Create Release Package
Expand Down Expand Up @@ -104,8 +115,11 @@ jobs:
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand Down Expand Up @@ -140,17 +154,22 @@ jobs:
--prerelease=nightly.$(date -u +'%Y%m%d') \
--skip.commit
# Now we'll be preparing a release package (with the "real" version)
- name: Align Versions
run: ./scripts/align-version.sh
- name: Run "align-version.sh"
run: |-
./scripts/align-version.sh
- name: Full Build
run: yarn build
- name: Package Libraries
run: yarn package
- name: "Upload Artifact: release-package"
run: |-
yarn build
- name: Package
run: |-
yarn package
# Upload artifacts
- name: 'Upload Artifact: release-package'
uses: actions/upload-artifact@v2
with:
name: release-package
path: ${{ github.workspace }}/dist/

test:
name: Test (${{ matrix.os }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }})
needs: build
Expand Down Expand Up @@ -226,11 +245,27 @@ jobs:
uses: actions/download-artifact@v2
with:
name: built-tree
# Put GitBash ahead of $PATH, so we avoid surprises due to bad tar, etc...
# (technically a hack around https://github.com/actions/virtual-environments/issues/282)
- name: 'Windows: Put GitBash ahead of $PATH'
if: runner.os == 'Windows'
run: |-
echo "::add-path::C:\Program Files\Git\usr\bin"
- name: Extract Artifact
run: |-
echo "::group::Untar Archive"
tar Jxvf built-tree.tar.xz
echo "::endgroup"
rm built-tree.tar.xz
- name: Locate Caches
id: cache-locations
run: |-
echo "::group::Upgrade pip"
# Need to have PIP >= 20.1 for "pip cache dir" to work
python3 -m pip install --upgrade pip
echo "::endgroup"
echo "::set-output name=pip-cache::$(python3 -m pip cache dir)"
echo "::set-output name=yarn-cache::$(yarn cache dir)"
- name: Cache
Expand All @@ -247,9 +282,10 @@ jobs:
${{ runner.os }}-node@${{ matrix.node }}-python@${{ matrix.python }}-
${{ runner.os }}-node@${{ matrix.node }}-
${{ runner.os }}-
# Install dependencies (ensures arch/os specific packages are re-built)
# Run the tests
- name: Install Dependencies
run: yarn install --frozen-lockfile
# Run all tests
run: |-
yarn install --frozen-lockfile
- name: Test
run: yarn test
run: |-
yarn test
45 changes: 45 additions & 0 deletions .mergify.yml → .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ pull_request_rules:
- status-success~=AWS CodeBuild us-east-1
- status-success=continuous-integration/travis-ci/pr
- status-success=Semantic Pull Request
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
- status-success~=^Test \(windows-.*$
# One test for each supported nodejs version
- status-success~=^Test \(.* node 10 .*$
- status-success~=^Test \(.* node 12 .*$
- status-success~=^Test \(.* node 14 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
# One test for Python 3.6, 3.7, and 3.8
- status-success~=^Test \(.* python 3\.6 .*$
- status-success~=^Test \(.* python 3\.7 .*$
- status-success~=^Test \(.* python 3\.8 .*$

- name: Synchronize that PR to upstream and merge it (squash)
actions:
Expand Down Expand Up @@ -61,6 +76,21 @@ pull_request_rules:
- status-success~=AWS CodeBuild us-east-1
- status-success=continuous-integration/travis-ci/pr
- status-success=Semantic Pull Request
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
- status-success~=^Test \(windows-.*$
# One test for each supported nodejs version
- status-success~=^Test \(.* node 10 .*$
- status-success~=^Test \(.* node 12 .*$
- status-success~=^Test \(.* node 14 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
# One test for Python 3.6, 3.7, and 3.8
- status-success~=^Test \(.* python 3\.6 .*$
- status-success~=^Test \(.* python 3\.7 .*$
- status-success~=^Test \(.* python 3\.8 .*$

- name: Synchronize that PR to upstream and merge it (no-squash)
actions:
Expand Down Expand Up @@ -91,6 +121,21 @@ pull_request_rules:
- status-success~=AWS CodeBuild us-east-1
- status-success=continuous-integration/travis-ci/pr
- status-success=Semantic Pull Request
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
- status-success~=^Test \(windows-.*$
# One test for each supported nodejs version
- status-success~=^Test \(.* node 10 .*$
- status-success~=^Test \(.* node 12 .*$
- status-success~=^Test \(.* node 14 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
# One test for Python 3.6, 3.7, and 3.8
- status-success~=^Test \(.* python 3\.6 .*$
- status-success~=^Test \(.* python 3\.7 .*$
- status-success~=^Test \(.* python 3\.8 .*$

- name: Clean branch up
actions:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"dist-clean": "lerna run dist-clean --stream && rm -rf dist",
"fetch-dotnet-snk": "bash scripts/fetch-dotnet-snk.sh",
"package": "bash scripts/package.sh",
"test": "lerna run test --stream",
"test": "lerna run test --concurrency=1 --stream",
"test:integ": "lerna run test:integ --stream",
"test:update": "lerna run test:update --stream"
"test:update": "lerna run test:update --concurrency=1 --stream"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"@types/node": "^10.17.28",
"jsii-calc": "^0.0.0",
"jsii-pacmak": "^0.0.0",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"@types/semver": "^7.3.1",
"jsii-build-tools": "^0.0.0",
"semver": "^7.3.2",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/integ-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^1.19.1",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
},
"jest": {
"errorOnDeprecated": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"@jsii/runtime": "^0.0.0",
"@types/node": "^10.17.28",
"jsii-build-tools": "^0.0.0",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^0.0.0",
"prettier": "^1.19.1",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
},
"jest": {
"collectCoverage": true,
Expand Down
40 changes: 22 additions & 18 deletions packages/@jsii/kernel/test/kernel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,31 @@ defineTest.skip = function (
return defineTest(name, method, test.skip);
};

test('load preserves file permissions', async () => {
// Changing the umask to 077 (which would neutralize group/other permissions)
const originalUmask = process.umask(0o077);
// Note: this test asserts file permissions, which work differently on Windows, so we skip it there
(process.platform === 'win32' ? test.skip : test)(
'load preserves file permissions',
async () => {
// Changing the umask to 077 (which would neutralize group/other permissions)
const originalUmask = process.umask(0o077);

try {
const kernel = await createCalculatorSandbox(
'load_preserves_file_permissions',
);
try {
const kernel = await createCalculatorSandbox(
'load_preserves_file_permissions',
);

const result = kernel.sinvoke({
fqn: 'jsii-calc.UmaskCheck',
method: 'mode',
});
expect(result.result).toBe(0o644);
const result = kernel.sinvoke({
fqn: 'jsii-calc.UmaskCheck',
method: 'mode',
});
expect(result.result).toBe(0o644);

return closeRecording(kernel);
} finally {
// Restore the original umask
process.umask(originalUmask);
}
});
return closeRecording(kernel);
} finally {
// Restore the original umask
process.umask(originalUmask);
}
},
);

defineTest('stats() return sandbox statistics', (sandbox) => {
const stats = sandbox.stats({});
Expand Down
38 changes: 0 additions & 38 deletions packages/@jsii/python-runtime/bin/generate

This file was deleted.

44 changes: 0 additions & 44 deletions packages/@jsii/python-runtime/bin/generate-calc

This file was deleted.

Loading

0 comments on commit baeebbe

Please sign in to comment.