Skip to content

Commit

Permalink
chore(WEBRTC-1715): change npm to use yarn and update dependencies (#280
Browse files Browse the repository at this point in the history
)

* chore: remove package.lock and add yarn.lock

* chore: update github actions to use yarn

* chore: update dependencies and fix react-client example dependencies

* chore: yarn lock update

* chore: install react-native deps

* chore: update js examples
  • Loading branch information
DeividVeloso authored Apr 26, 2022
1 parent 618a568 commit 1e354dd
Show file tree
Hide file tree
Showing 37 changed files with 55,484 additions and 148,765 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,32 @@ jobs:
git config user.name TelnyxIntegrations
git config user.email integrations@telnyx.com
- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/${{ env.PACKAGE_DIR }}
run: npm ci
run: yarn install --frozen-lockfile
- name: Test
working-directory: packages/${{ env.PACKAGE_DIR }}
run: npm test
run: yarn test
env:
CI: true
- if: github.event.inputs.package == 'webrtc'
name: Generate docs
working-directory: packages/${{ env.PACKAGE_DIR }}
run: |
npm run docs # IDEA Set --gitRevision to release-it tag
yarn docs # IDEA Set --gitRevision to release-it tag
git add docs
git commit -m "docs: update ts docs" || echo "docs: no docs changes to commit"
- name: Create draft release
working-directory: packages/${{ env.PACKAGE_DIR }}
run: |
npm run release -- \
yarn release -- \
--ci \
--github.draft \
--no-npm.publish \
Expand Down
37 changes: 20 additions & 17 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ jobs:
git config user.name TelnyxIntegrations
git config user.email integrations@telnyx.com
- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/js
run: npm ci --ignore-scripts
run: yarn install --frozen-lockfile
- name: Publish package
working-directory: packages/js
run: npm publish --access public
run: yarn publish --access public
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }}
Expand Down Expand Up @@ -105,19 +106,20 @@ jobs:
run: |
git config user.name TelnyxIntegrations
git config user.email integrations@telnyx.com
- name: Use Node.js 11.x
uses: actions/setup-node@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: "11.x"
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/react-client
run: npm ci
run: yarn install --frozen-lockfile
- name: Publish package
working-directory: packages/react-client
run: npm publish --access public
run: yarn publish --access public
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }}
Expand All @@ -142,25 +144,26 @@ jobs:
run: |
git config user.name TelnyxIntegrations
git config user.email integrations@telnyx.com
- name: Use Node.js 11.x
uses: actions/setup-node@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: "11.x"
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/js
run: npm ci --ignore-scripts
run: yarn install --frozen-lockfile
- name: Release API docs
working-directory: packages/api-docs
run: |
npm run release -- \
yarn release -- \
$(node ./get_version.js) \
--ci \
--no-npm.publish \
&& \
npm publish --access public
yarn publish --access public
env:
CI: true
# Both tokens are present because publishing with
Expand Down
62 changes: 29 additions & 33 deletions .github/workflows/webrtc-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,33 @@ on:
jobs:
unit-tests:
name: Unit Test
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# https://github.com/peter-evans/create-pull-request/issues/122
ref: 'main'
# https://github.com/release-it/release-it/issues/657#issuecomment-647848200
fetch-depth: 0
- name: Use Node.js 11.x
uses: actions/setup-node@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '11.x'
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/js
run: npm ci --ignore-scripts
run: yarn install --frozen-lockfile
- name: Test
working-directory: packages/js
run: npm test
run: yarn test
env:
CI: true

cypress-run-chrome:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
# let's make sure our tests pass on Chrome browser
name: E2E tests on Chrome and Firefox
steps:
Expand All @@ -46,35 +48,37 @@ jobs:
ref: 'main'
# https://github.com/release-it/release-it/issues/657#issuecomment-647848200
fetch-depth: 0
- name: Use Node.js 11.x
uses: actions/setup-node@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '11.x'
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install Cypress Dependency
working-directory: packages/js/examples/react-audio-widgets
run: npm install -D cypress
run: yarn install -D cypress
- name: Install react-audio-widgets dependencies
working-directory: packages/js/examples/react-audio-widgets
run: npm ci --ignore-scripts
run: yarn install --frozen-lockfile
- name: Run Storybook Audio Widgets
working-directory: packages/js/examples/react-audio-widgets
run: npm run storybook &
run: yarn storybook &
env:
CI: true
STORYBOOK_USERNAME: ${{ secrets.NPM_CI_STORYBOOK_USERNAME }}
STORYBOOK_PASSWORD: ${{ secrets.NPM_CI_STORYBOOK_PASSWORD }}
STORYBOOK_DESTINATION: ${{ secrets.NPM_CI_STORYBOOK_DESTINATION }}
- name: Test on Chrome
working-directory: packages/js/examples/react-audio-widgets
run: npm run cypress:ci:chrome
run: yarn cypress:ci:chrome
env:
CI: true
STORYBOOK_USERNAME: ${{ secrets.NPM_CI_STORYBOOK_USERNAME }}
STORYBOOK_PASSWORD: ${{ secrets.NPM_CI_STORYBOOK_PASSWORD }}
STORYBOOK_DESTINATION: ${{ secrets.NPM_CI_STORYBOOK_DESTINATION }}
- name: Test on Firefox
working-directory: packages/js/examples/react-audio-widgets
run: npm run cypress:ci:firefox
run: yarn cypress:ci:firefox
env:
CI: true
STORYBOOK_USERNAME: ${{ secrets.NPM_CI_STORYBOOK_USERNAME }}
Expand All @@ -91,28 +95,20 @@ jobs:
ref: 'main'
# https://github.com/release-it/release-it/issues/657#issuecomment-647848200
fetch-depth: 0
- name: Use Node.js 11.x
uses: actions/setup-node@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '11.x'
node-version: "14.x"
cache: 'yarn'
registry-url: https://registry.npmjs.org/
- name: Install shared dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Install package dependencies
working-directory: packages/js
run: npm ci --ignore-scripts
run: yarn install --frozen-lockfile
- name: Build
working-directory: packages/js
run: npm run build
- name: Release dry run
working-directory: packages/js
run: |
npm run release -- \
--dry-run \
--ci \
--no-git.tag \
--github.draft \
--no-npm.publish \
--no-npm.tag
run: yarn build
env:
NPM_TOKEN: ${{ secrets.NPM_CI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ yarn-error.log
lib
coverage
.vscode
yarn.lock
package-lock.json
Loading

0 comments on commit 1e354dd

Please sign in to comment.