From 05e7d6cc2329fe14126c109b585e0d7924e3abb1 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 9 Dec 2020 13:28:47 -0600 Subject: [PATCH] Add e2e arch test --- .github/workflows/versions.yml | 13 +++++++++++++ __tests__/verify-arch.sh | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 __tests__/verify-arch.sh diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 3beb1f71..4727b4c8 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -96,4 +96,17 @@ jobs: node-version: 0.12.18 - name: Verify node run: __tests__/verify-node.sh 0.12.18 SKIP_NPM + shell: bash + + arch: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Setup node 12 x86 from dist + uses: ./ + with: + node-version: '12' + architecture: 'x86' + - name: Verify node + run: __tests__/verify-arch.sh "ia32" shell: bash \ No newline at end of file diff --git a/__tests__/verify-arch.sh b/__tests__/verify-arch.sh new file mode 100644 index 00000000..7d4ebcbb --- /dev/null +++ b/__tests__/verify-arch.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -n "$1" ]; then + architecture="$(node -e 'console.log(process.arch)')" + if [ -z "$(echo $architecture | grep --fixed-strings $1)" ]; then + echo "Unexpected architecture" + exit 1 + fi +else + echo "Skip testing architecture" +fi \ No newline at end of file