forked from twilio/twilio-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable a draft release for npm and homebrew for sanity testing (t…
- Loading branch information
1 parent
7b9abb1
commit 9899fdf
Showing
8 changed files
with
22,944 additions
and
4,044 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
echo "Running revert last commit script" | ||
branch="$1" | ||
echo "Git configurations :" | ||
git config --global user.email "team_interfaces+github@twilio.com" | ||
git config --global user.name "twilio-dx" | ||
echo $branch | ||
nCommit=$(git rev-parse --verify HEAD) | ||
nCommitAuthor=$(git log -n 1 --pretty=format:'%an' $nCommit) | ||
if [[ $nCommitAuthor == *"semantic-release-bot"* ]]; then | ||
echo "Reverting commit by semantic release bot:" | ||
echo $(git rev-parse --verify HEAD) | ||
git revert $(git rev-parse --verify HEAD) | ||
git push origin refs/heads/$1:refs/heads/$1 | ||
fi | ||
nCommit=$(git rev-parse --verify HEAD) | ||
nCommitAuthor=$(git log -n 1 --pretty=format:'%an' $nCommit) | ||
if [[ $nCommitAuthor == *"twilio-dx"* ]]; then | ||
echo "Reverting commit for oai spec:" | ||
echo $(git rev-parse --verify HEAD) | ||
git revert $(git rev-parse --verify HEAD) | ||
git push origin refs/heads/$1:refs/heads/$1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CLI Tests on brew installations | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to use for running test cases' | ||
required: true | ||
|
||
jobs: | ||
test: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 14.x, 10.x] | ||
steps: | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Global - Testing installation of Twilio CLI (1) | ||
run: | | ||
brew tap twilio/brew && brew install twilio@${{ github.event.inputs.version }} | ||
node test/asserts/validate_tests.js | ||
- name: Global - Testing upgrade Twilio CLI (2) | ||
run: | | ||
brew tap twilio/brew && brew install twilio@${{ github.event.inputs.version }} | ||
brew upgrade twilio | ||
node test/asserts/validate_tests.js | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CLI Tests on npm installations | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to use for running test cases' | ||
required: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 14.x, 10.x] | ||
steps: | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Global - Testing installation of Twilio CLI (1) | ||
run: | | ||
npm make install -g twilio-cli@${{ github.event.inputs.version }} | ||
node test/asserts/validate_tests.js | ||
- name: Global - Testing upgrade Twilio CLI (2) | ||
run: | | ||
npm make install -g twilio-cli@${{ github.event.inputs.version }} | ||
npm install -g twilio-cli | ||
node test/asserts/validate_tests.js | ||
- name: Local - Testing installation of Twilio CLI (1) | ||
run: | | ||
npm install twilio-cli | ||
node test/asserts/validate_tests.js | ||
- name: Local - Testing upgrade Twilio CLI (2) | ||
run: | | ||
npm install twilio-cli@${{ github.event.inputs.version }} | ||
npm install twilio-cli | ||
node test/asserts/validate_tests.js | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Delete draft tagged release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag-name: | ||
description: 'Tag name to delete' | ||
|
||
jobs: | ||
delete-draft-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Delete draft release oclif | ||
uses: dev-drprasad/delete-tag-and-release@v0.2.0 | ||
with: | ||
delete_release: true | ||
tag_name: ${{github.event.inputs.tag-name}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract branch name | ||
id: extract_branch | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ steps.extract_branch.outputs.branch }} | ||
fetch-depth: 0 | ||
- name: Undo Push | ||
run: | | ||
bash .github/scripts/revert-commit-draft-release.sh "${{ steps.extract_branch.outputs.branch }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.