add test for command field #75
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
name: Publish packages to npmjs | |
on: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [ compose-as-code, create-composition ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Dependencies ${{ matrix.package }}🗂️ | |
run: yarn install --frozen-lockfile | |
working-directory: ./packages/${{ matrix.package }} | |
- name: Test ${{ matrix.package }}🧪 | |
run: yarn test | |
working-directory: ./packages/${{ matrix.package }} | |
- name: Format Check ${{ matrix.package }} 📄 | |
run: yarn format:check | |
working-directory: ./packages/${{ matrix.package }} | |
- name: Lint Check ${{ matrix.package }} | |
run: yarn lint | |
working-directory: ./packages/${{ matrix.package }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Setup Git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor}}@users.noreply.github.com" | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Publish Packages 🚀 | |
working-directory: ./packages/compose-as-code | |
run: yarn && yarn tsc | |
- name: Publish Packages 🚀 | |
env: | |
CI: true | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx lerna publish |