Skip to content

Commit

Permalink
feat(CI): matrix tests of compatibility with Blueprint
Browse files Browse the repository at this point in the history
chore: CHANGELOG

fix: add the preparation step

fix: corepack & bun setup
  • Loading branch information
novusnota committed Sep 17, 2024
1 parent 5bce5dc commit 8d9f4ac
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
74 changes: 72 additions & 2 deletions .github/workflows/tact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,80 @@ jobs:
yarn build
yarn test
- name: Test compatibility with Blueprint
test-blueprint:
strategy:
fail-fast: false
matrix:
node-version: [22]
os: [ubuntu-latest, windows-latest, macos-latest]
package-manager: [npm, yarn, pnpm, bun]
# follow-up ifs are for ensuring clean state at all times

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn" # dependency caching only

- uses: oven-sh/setup-bun@v2
if: ${{ matrix.package-manager == 'bun' }}

- uses: pnpm/action-setup@v4
if: ${{ matrix.package-manager == 'pnpm' }}

- name: Prepare Tact compiler
run: |
yarn create ton -- test-project --type tact-counter --contractName Counter &&
# There are issues with corepack + it disallows the use of pnpm for linkage later on
# It's only useful for making sure that Tact compiler developers use the same version of Yarn
# https://github.com/nodejs/corepack/issues/112
# corepack enable
yarn install
yarn clean
yarn gen
yarn build
- name: (npm) Test compatibility with Blueprint
if: ${{ matrix.package-manager == 'npm' }}
run: |
npm link &&
npm create ton@latest -- test-project --type tact-counter --contractName Counter &&
cd test-project &&
npm link @tact-lang/compiler &&
npm run build &&
npm run test
- name: (yarn) Test compatibility with Blueprint
if: ${{ matrix.package-manager == 'yarn' }}
run: |
yarn link &&
yarn create ton test-project --type tact-counter --contractName Counter &&
cd test-project &&
yarn link @tact-lang/compiler &&
yarn build &&
yarn test
- name: (pnpm) Test compatibility with Blueprint
if: ${{ matrix.package-manager == 'pnpm' }}
run: |
pnpm link -g &&
pnpm create ton@latest test-project --type tact-counter --contractName Counter &&
cd test-project &&
pnpm link -g @tact-lang/compiler &&
pnpm build &&
pnpm test
- name: (bun) Test compatibility with Blueprint
if: ${{ matrix.package-manager == 'bun' }}
run: |
bun link &&
bun create ton@latest test-project --type tact-counter --contractName Counter &&
cd test-project &&
bun link @tact-lang/compiler &&
bun run build && # without 'run' Bun will use its own bundler
bun run test # without 'run' Bun will use its own test runner
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- CI now does matrix tests with [Blueprint](https://github.com/ton-org/blueprint) and `npm`, `yarn`, `pnpm`, and `bun` package managers: PR [#848](https://github.com/tact-lang/tact/pull/848)

### Fixed

## [1.5.0] - 2024-09-15
Expand Down

0 comments on commit 8d9f4ac

Please sign in to comment.