[CLNP-7689] Move ci from circle ci to GitHub action #12
  
    
      This file contains hidden or 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
    
  
  
    
  | 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 | |
| - name: Store artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage | |
| retention-days: 2 |