diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ccd3c5fc..4897febe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: run: yarn install - name: Creating a Production Build - run: yarn dlx nx run root:build + run: nx run root:build - name: Pushing to build branch uses: s0/git-publish-subdir-action@develop diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..cec68f4b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,53 @@ +name: code-gear > lint +on: + pull_request: + branches: + - master + - ci-testing + push: + branches: + - master + - ci-testing +permissions: + contents: write + +jobs: + lint: + name: Linting project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Derive appropriate SHAs for base and head for `nx affected` commands + uses: nrwl/nx-set-shas@v3 + with: + main-branch-name: 'master' + + - run: | + echo "BASE: ${{ env.NX_BASE }}" + echo "HEAD: ${{ env.NX_HEAD }}" + + - name: Installing Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.8.0 + + - name: Cache Yarn dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/yarn + ~/.yarn/cache + .yarn/cache + node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Installing dependencies + run: yarn install + + - name: Linting project + run: nx run root:lint diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 799d5901..2f695c78 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -52,7 +52,7 @@ jobs: run: yarn install - name: Building storybook - run: yarn dlx nx run web-ui:storybook:build + run: nx run web-ui:storybook:build - name: Pushing to build-storybook branch uses: JamesIves/github-pages-deploy-action@v4 @@ -62,4 +62,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Testing storybook in production - run: yarn dlx nx run web-ui:storybook:test:production + run: run web-ui:storybook:test:production diff --git a/packages/web/ui/project.json b/packages/web/ui/project.json index 690a0272..8c3c32f2 100644 --- a/packages/web/ui/project.json +++ b/packages/web/ui/project.json @@ -41,13 +41,13 @@ "storybook:test:development": { "executor": "nx:run-commands", "options": { - "command": "test-storybook -c packages/web/ui/.storybook --url=http://localhost:4400 --watch" + "command": "test-storybook -c packages/web/ui/.config/storybook --url=http://localhost:4400 --watch" } }, "storybook:test:production": { "executor": "nx:run-commands", "options": { - "command": "test-storybook -c packages/web/ui/.storybook --url=https://gearonix.github.io/code-gear" + "command": "test-storybook -c packages/web/ui/.config/storybook --url=https://gearonix.github.io/code-gear" } }, "storybook:preview": {