Skip to content

Commit

Permalink
fix: fail on any error on Windows (#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
verytactical authored Feb 12, 2025
1 parent f9adea9 commit 25a2154
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 39 deletions.
45 changes: 45 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -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
57 changes: 19 additions & 38 deletions .github/workflows/tact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}

0 comments on commit 25a2154

Please sign in to comment.