From 25a2154aa7dbea5b86f3c7b20208493355c1d3d9 Mon Sep 17 00:00:00 2001 From: verytactical <186486509+verytactical@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:55:05 +0400 Subject: [PATCH] fix: fail on any error on Windows (#1752) --- .github/actions/test/action.yml | 45 ++++++++++++++++++++++++++ .github/workflows/tact.yml | 57 +++++++++++---------------------- knip.json | 3 +- 3 files changed, 66 insertions(+), 39 deletions(-) create mode 100644 .github/actions/test/action.yml diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml new file mode 100644 index 000000000..8f6ef5287 --- /dev/null +++ b/.github/actions/test/action.yml @@ -0,0 +1,45 @@ +name: "Setup Node.js" +description: "Set up Node.js and install dependencies" +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + + - name: Install dependencies + run: | + corepack enable + yarn install + + - name: List installed packages + run: | + yarn list + + - name: Print some environment info + run: | + yarn cross-env echo $NODE_ENV + + - name: Build Tact compiler + run: | + yarn clean + yarn gen + yarn build + + - name: Test Tact compiler + run: | + yarn coverage + + - name: Show an example .pkg file on Windows + if: runner.os == 'Windows' + run: | + type examples\output\echo_Echo.pkg + + - name: Link Tact yarn package + run: | + yarn link diff --git a/.github/workflows/tact.yml b/.github/workflows/tact.yml index 73ae290d0..7fe1ecc29 100644 --- a/.github/workflows/tact.yml +++ b/.github/workflows/tact.yml @@ -76,52 +76,33 @@ jobs: fail-fast: false matrix: node-version: [22] - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: "yarn" - - - name: Install dependencies + - uses: ../actions/test + - name: Test compatibility with tact-template run: | - corepack enable + # !!!!!!! Don't forget to update test-windows below !!!!!!! + git clone https://github.com/tact-lang/tact-template.git + cd tact-template yarn install - - - name: List installed packages - run: | - yarn list - - - name: Print some environment info - run: | - yarn cross-env echo $NODE_ENV - - - name: Build Tact compiler - run: | - yarn clean - yarn gen + yarn link @tact-lang/compiler yarn build + yarn test - - name: Test Tact compiler - run: | - yarn coverage - - - name: Show an example .pkg file on Windows - if: runner.os == 'Windows' - run: | - type examples\output\echo_Echo.pkg - - - name: Link Tact yarn package - run: | - yarn link - + test-windows: + strategy: + fail-fast: false + matrix: + node-version: [22] + os: [windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: ../actions/test - name: Test compatibility with tact-template run: | + # !!!!!!! Don't forget to update test above !!!!!!! + $ErrorActionPreference = 'Stop' git clone https://github.com/tact-lang/tact-template.git cd tact-template yarn install diff --git a/knip.json b/knip.json index 8099f42f1..689b122a7 100644 --- a/knip.json +++ b/knip.json @@ -12,7 +12,8 @@ "src/grammar/next/grammar.ts", "src/func/funcCompile.ts", "src/utils/tricks.ts", - ".github/workflows/tact*.yml" + ".github/workflows/tact*.yml", + ".github/actions/**/*.yml" ], "ignoreDependencies": ["@tact-lang/ton-abi"] }