Skip to content
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

Remove the ropm step, devs just need to do this manually #310

Merged
merged 3 commits into from
Jan 30, 2025
Merged
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
45 changes: 1 addition & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,7 @@ jobs:
node-version: "16.20.2"
architecture: 'x64' # fix for macos-latest
- run: cd bsc-plugin && npm install
- run: cd bsc-plugin && npx ropm copy
- run: cd bsc-plugin && npm run preversion
- run: cd bsc-plugin && npm run publish-coverage
- run: cd tests && npm install && npm run build
npm-release:
#only run this task if a tag starting with 'v' was used to trigger this (i.e. a tagged release)
if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "16.20.2"
architecture: 'x64' # fix for macos-latest
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: cd bsc-plugin && npm ci
- run: cd bsc-plugin && npm run build
#create npm package
- run: cd bsc-plugin && npm pack

#create GitHub release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false #contains(github.ref, '-beta.') == true

#upload package to GitHub release
- name: Upload GitHub Release Assets
uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./bsc-plugin/*.tgz"]'

#If there's a dash followed by an alpha character, this is a prerelease and should be tagged "next". Otherwise tag as "latest"
- run: if [[ "${{ github.ref }}" =~ -[a-zA-Z] ]]; then echo "DIST_TAG=next" >> $GITHUB_ENV; else echo "DIST_TAG=latest" >> $GITHUB_ENV; fi

#upload to npm
- run: cd bsc-plugin && npm publish --tag ${{env.DIST_TAG}}
1 change: 1 addition & 0 deletions .github/workflows/create-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
echo "ARTIFACT_URL=$ARTIFACT_URL" >> $GITHUB_ENV

- run: cd bsc-plugin && npm ci
- run: cd bsc-plugin && npx ropm copy
- run: cd bsc-plugin && npm version "$BUILD_VERSION" --no-git-tag-version
- run: cd bsc-plugin && npm pack

Expand Down
1 change: 0 additions & 1 deletion bsc-plugin/package-lock.json

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

5 changes: 1 addition & 4 deletions bsc-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
"publish-npm:beta": "npm run test && npm publish --tag=beta",
"local": "ts-node scripts/install-local.js",
"remote": "ts-node scripts/install-npm.js",
"cli": "ts-node src/cli.ts",
"prepack": "node scripts/pack.js --pre",
"postpack": "node scripts/pack.js --post",
"postinstall": "ropm copy"
"cli": "ts-node src/cli.ts"
},
"repository": {
"type": "git",
Expand Down
20 changes: 0 additions & 20 deletions bsc-plugin/scripts/pack.js

This file was deleted.

2 changes: 1 addition & 1 deletion framework/src/source/rooibos/Test.bs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace rooibos
m.recordExecutionTime()
end if

return m.differed
return m.deferred
end function

' Sets up a promise chain to link the deferred to the test promise results
Expand Down
6 changes: 3 additions & 3 deletions tests/src/source/Promises.spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace tests
class PromisesTests extends rooibos.BaseTestSuite

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@describe("tests that should as fail")
@describe("tests that should fail")
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

@it("fail the test as the returned to the test promise that will reject")
Expand Down Expand Up @@ -46,7 +46,7 @@ namespace tests
end function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@describe("tests that should as fail as crashes")
@describe("tests that should fail as crashes")
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

@async(100)
Expand Down Expand Up @@ -81,4 +81,4 @@ function toPromiseWithDelay(duration = 0.0001 as float, value = true as dynamic,
end if
end sub, { deferred: deferred, value: value, resolve: resolve }, duration)
return deferred
end function
end function
Loading