Skip to content

Commit

Permalink
Merge pull request #120 from diego-aquino/release/v0.3.0
Browse files Browse the repository at this point in the history
chore(release): v0.3.0
  • Loading branch information
diego-aquino authored Mar 31, 2024
2 parents 880ab97 + 636bdeb commit 1ca55b5
Show file tree
Hide file tree
Showing 73 changed files with 6,526 additions and 2,776 deletions.
24 changes: 17 additions & 7 deletions .github/actions/zimic-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:
registry-url: ${{ inputs.node-registry-url }}

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Get pnpm store directory
id: pnpm-store
Expand All @@ -69,8 +69,6 @@ runs:
id: install-dependencies
shell: bash
run: |
workspaceRootInstallFlag='--filter zimic-root'
function composeFilterOptions() {
filterEntries=${*}
filterOptions=()
Expand All @@ -82,13 +80,25 @@ runs:
echo "${filterOptions[@]}"
}
partialInstallFlag="$(composeFilterOptions ${{ inputs.install }})"
installFlag="$workspaceRootInstallFlag $partialInstallFlag"
echo "install-filters=$installFlag" >> $GITHUB_OUTPUT
if [[ '${{ inputs.install }}' == '' ]]; then
workspaceRootInstallFlag=''
partialInstallFlag=''
installFlag=''
else
workspaceRootInstallFlag='--filter zimic-root'
partialInstallFlag="$(composeFilterOptions ${{ inputs.install }})"
installFlag="$workspaceRootInstallFlag $partialInstallFlag"
fi
echo "install-filters=$installFlag" >> $GITHUB_OUTPUT
pnpm install --prefer-offline --frozen-lockfile --ignore-scripts $installFlag
buildFlag="$(composeFilterOptions ${{ inputs.build }})"
if [[ '${{ inputs.build }}' == '' ]]; then
buildFlag=''
else
buildFlag="$(composeFilterOptions ${{ inputs.build }})"
fi
echo "build-filters=$buildFlag" >> $GITHUB_OUTPUT
NODE_ENV='${{ inputs.build-node-env }}' pnpm turbo build $buildFlag
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- 18
- 20

env:
NODE_VERSION: ${{ matrix.node-version }}

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
121 changes: 103 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ concurrency:

env:
CI: true
IS_PULL_REQUEST_TO_MAIN:
${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' && 'true' || 'false' }}
TURBO_LOG_ORDER: stream
TURBO_TOKEN:
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') &&
Expand All @@ -28,20 +30,13 @@ env:
"{./packages/*}[HEAD^1]..."' || './packages/*' }}

jobs:
ci:
name: CI
ci-general:
name: CI General
runs-on: ubuntu-latest
timeout-minutes: 12

strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
timeout-minutes: 10

env:
NODE_VERSION: ${{ matrix.node-version }}
NODE_VERSION: 20

steps:
- name: Checkout code
Expand All @@ -53,33 +48,123 @@ jobs:
id: zimic-setup
uses: ./.github/actions/zimic-setup
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}
turbo-token: ${{ env.TURBO_TOKEN }}
turbo-team: ${{ env.TURBO_TEAM }}
install: ${{ env.INSTALL_OPTIONS }}
build: ${{ env.BUILD_OPTIONS }}
build-node-env:
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') && 'development'
|| 'production' }}
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }}
install-playwright-browsers: true

- name: Check formatting style
uses: ./.github/actions/zimic-style-check
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ env.NODE_VERSION }}

- name: Lint code and check types
run: |
pnpm turbo \
types:check lint:turbo \
--continue \
--concurrency 100% \
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') && steps.zimic-setup.outputs.install-filters || '' }}
${{ steps.zimic-setup.outputs.install-filters }}
ci-node:
name: CI Node.js
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20

env:
NODE_VERSION: ${{ matrix.node-version }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Zimic
id: zimic-setup
uses: ./.github/actions/zimic-setup
with:
node-version: ${{ env.NODE_VERSION }}
turbo-token: ${{ env.TURBO_TOKEN }}
turbo-team: ${{ env.TURBO_TEAM }}
install: ${{ env.INSTALL_OPTIONS }}
build: ${{ env.BUILD_OPTIONS }}
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }}
install-playwright-browsers: true

- name: Run tests
run: |
pnpm turbo \
test:turbo \
--continue \
--concurrency 100% \
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') && steps.zimic-setup.outputs.install-filters || '' }}
${{ steps.zimic-setup.outputs.install-filters }}
ci-typescript:
name: CI TypeScript
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
typescript-version:
- '4.7'
- '4.8'
- '4.9'
- '5.0'
- '5.1'
- '5.2'
- '5.3'
- '5.4'

env:
NODE_VERSION: 20
TYPESCRIPT_VERSION: ${{ matrix.typescript-version }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Zimic
id: zimic-setup
uses: ./.github/actions/zimic-setup
with:
node-version: ${{ env.NODE_VERSION }}
turbo-token: ${{ env.TURBO_TOKEN }}
turbo-team: ${{ env.TURBO_TEAM }}
install: ${{ env.INSTALL_OPTIONS }}
build: ${{ env.BUILD_OPTIONS }}
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }}
install-playwright-browsers: false

- name: Set TypeScript version
run: |
pnpm update \
typescript@${{ matrix.typescript-version }} \
--recursive \
${{ steps.zimic-setup.outputs.install-filters }} \
--filter !zimic \
--filter !@zimic/*
- name: Check types
run: |
pnpm turbo \
types:check \
--continue \
--concurrency 100% \
${{ steps.zimic-setup.outputs.install-filters }} \
--filter !zimic \
--filter !@zimic/*
Loading

0 comments on commit 1ca55b5

Please sign in to comment.