Refactor CI workflows to improve build and test separate steps #122
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, test and release sqlite-wasm | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| jobs: | |
| btr: | |
| runs-on: ubuntu-22.04 | |
| name: build, test and release sqlite-wasm | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: update npm # https://docs.npmjs.com/trusted-publishers | |
| run: npm install -g npm@latest | |
| - name: setup playwright for tests | |
| run: npx playwright install --with-deps && npx playwright install msedge && npx playwright install chrome | |
| - name: build sqlite-wasm | |
| run: cd sqlite-wasm && npm run build && npm i | |
| - name: validate sqlite-wasm | |
| run: cd sqlite-wasm && npm run fix && npm run publint && npm run check-types | |
| - name: test sqlite-wasm | |
| run: cd sqlite-wasm && npm run test | |
| - name: e2e sqlite-memory | |
| env: | |
| APIKEY: ${{ secrets.APIKEY }} | |
| run: cd sqlite-wasm && node test/e2e.cjs | |
| - name: publish sqlite-wasm | |
| run: cd sqlite-wasm && npm publish --tag latest --access public --provenance |