Skip to content

Commit

Permalink
Merge pull request #890 from ScorexFoundation/v5.0.10-RC
Browse files Browse the repository at this point in the history
Release Candidate v5.0.10
  • Loading branch information
aslesarenko authored Aug 7, 2023
2 parents 1abafe9 + 595fbb8 commit 69c7975
Show file tree
Hide file tree
Showing 238 changed files with 8,337 additions and 1,392 deletions.
54 changes: 32 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 2.12.10, 2.11.12]
scala: [2.13.11, 2.12.18, 2.11.12]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -47,18 +47,8 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Runs tests and collect coverage
run: sbt -jvm-opts ci/ci.jvmopts ++${{ matrix.scala }} coverage test coverageReport coverageAggregate

# - name: Upload coverage report
# run: sbt ++${{ matrix.scala }} coverageReport coverageAggregate coveralls
# env:
# COVERALLS_REPO_TOKEN: $${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
- name: Runs tests
run: sbt -jvm-opts ci/ci.jvmopts ++${{ matrix.scala }} test

- name: Publish a snapshot ${{ github.ref }}
if: env.HAS_SECRETS == 'true'
Expand All @@ -68,15 +58,15 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

buildJs:
name: JS - Test and publish a snapshot
name: JS - Test and publish snapshots
env:
HAS_SECRETS: ${{ secrets.SONATYPE_PASSWORD != '' }}
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.10]
scala: [2.13.11]
java: [adopt@1.8]
node-version: [16.x]
node-version: [20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -85,12 +75,15 @@ jobs:
fetch-depth: 0

- name: Setup NPM
uses: pnpm/action-setup@v2
uses: actions/setup-node@v3
with:
version: 7.21.0
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: pnpm install --prefix sigma-js
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: ./sigma-js/package-lock.json

- name: Install NPM dependencies
run: npm ci --prefix sigma-js

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
Expand All @@ -110,11 +103,28 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Runs tests and collect coverage
run: sbt -jvm-opts ci/ci.jvmopts ++${{ matrix.scala }} commonJS/test corelibJS/test interpreterJS/test
run: sbt -jvm-opts ci/ci.jvmopts ++${{ matrix.scala }} commonJS/test corelibJS/test interpreterJS/test graphirJS/test sdkJS/test scJS/test

- name: Publish a snapshot ${{ github.ref }}
- name: Publish a JVM snapshot ${{ github.ref }}
if: env.HAS_SECRETS == 'true'
run: sbt ++${{ matrix.scala }} sdkJS/publish
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

- name: JS Build
run: sbt -jvm-opts ci/ci.jvmopts ++${{ matrix.scala }} scJS/fastOptJS

- name: Runs JS tests
run: npm run test
working-directory: ./sigma-js

- name: Setup JS snapshot
run: npm run ci:snapshot
working-directory: ./sigma-js

- name: Publish JS snapshot ${{ github.ref }}
run: npm publish --tag snapshot
working-directory: ./sigma-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Setup NPM
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: ./sigma-js/package-lock.json

- name: Install NPM dependencies
run: npm ci --prefix sigma-js
# Ensure latest npm version to be installed for npm provenance support
- run: npm install -g npm

- name: Import GPG key
run: ci/import_gpg.sh
env:
Expand All @@ -42,3 +55,12 @@ jobs:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

- name: JS Build
run: sbt -jvm-opts ci/ci.jvmopts scJS/fastOptJS

- name: Publish JS snapshot ${{ github.ref }}
run: npm publish --provenance
working-directory: ./sigma-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ docs/spec/out/
test-out/
flamegraphs/
node_modules/
package-lock.json
sigma-js/.npmrc
sigma-js/dist/

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ By default SBT uses Scala 2.12 for compilation and running tests. To compile for

```shell
$ sbt
sbt:sigma-state> ++2.13.8
sbt:sigma-state> ++2.13.11
sbt:sigma-state> compile
sbt:sigma-state> test
```
Expand Down
Loading

0 comments on commit 69c7975

Please sign in to comment.