diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 000000000..03af8281e --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,49 @@ +name: Build and Test + +on: + pull_request: + types: [opened, synchronize] + + push: + branches: + - main +concurrency: + group: build-and-test-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + + env: + BOT_GH_TOKEN: ${{ secrets.BOT_GH_TOKEN }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '16.19.1' + cache: 'yarn' + + - name: Install dependencies + run: | + yarn install --immutable + + - name: Run lint + if: ${{ success() }} + run: | + yarn lint + + - name: Run build + if: ${{ success() }} + run: | + yarn build + + - name: Run test + if: ${{ success() }} + timeout-minutes: 15 + run: | + yarn test --forceExit --runInBand diff --git a/.github/workflows/pr-comment-bot.yml b/.github/workflows/pr-comment-bot.yml index b008d503c..332622978 100644 --- a/.github/workflows/pr-comment-bot.yml +++ b/.github/workflows/pr-comment-bot.yml @@ -4,6 +4,7 @@ on: types: [created] jobs: pr-comment: + if: ${{ github.event.issue.pull_request }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -11,9 +12,9 @@ jobs: - uses: sendbird/release-automation-action@latest with: gh_token: ${{ secrets.GITHUB_TOKEN }} - circleci_token: ${{ secrets.CIRCLECI_API_TOKEN }} product: 'uikit' platform: 'js' framework: 'react' product_jira_project_key: 'UIKIT' product_jira_version_prefix: 'js_uikit' + ci: 'github' diff --git a/.circleci/config.yml b/backup_circleci/config.yml similarity index 100% rename from .circleci/config.yml rename to backup_circleci/config.yml