Skip to content

Commit

Permalink
use GH node version
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNikiforov committed Apr 16, 2024
1 parent 4f40cad commit 086f97d
Showing 1 changed file with 63 additions and 45 deletions.
108 changes: 63 additions & 45 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ jobs:
path: |
dist/npm
- name: Setup Node for Test
- name: Setup Node for Publish
if: steps.get_image.outputs.digest != ''
uses: actions/setup-node@v4
with:
Expand All @@ -1518,57 +1518,75 @@ jobs:
NODE_AUTH_TOKEN: "fake"

- name: Set up QEMU
if: false
if: steps.get_image.outputs.digest != '' && matrix.prop[1] != 'amd64' && matrix.prop[1] != '386'
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Run install for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
if: steps.get_image.outputs.digest != ''
id: run_install
uses: addnab/docker-run-action@v3
continue-on-error: true
with:
image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
shell: sh
options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
run: >
echo "install npm..." &&
export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
/work/scripts/ensure_node &&
echo "test icloudpd..." &&
npm install --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} &&
icloudpd --help
# - name: Run install for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
# if: steps.get_image.outputs.digest != ''
# id: run_install
# uses: addnab/docker-run-action@v3
# continue-on-error: true
# with:
# image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
# shell: sh
# options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
# run: >
# echo "install npm..." &&
# export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
# /work/scripts/ensure_node &&
# echo "test icloudpd..." &&
# npm install --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} &&
# icloudpd --help

# - name: Run install global for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
# if: steps.get_image.outputs.digest != ''
# id: run_install_global
# uses: addnab/docker-run-action@v3
# continue-on-error: true
# with:
# image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
# shell: sh
# options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
# run: >
# echo "install npm..." &&
# export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
# /work/scripts/ensure_node &&
# echo "test icloudpd..." &&
# npm install -g --unsafe-perm --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} &&
# icloudpd --help

- name: Run install global for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
if: steps.get_image.outputs.digest != ''
id: run_install_global
uses: addnab/docker-run-action@v3
continue-on-error: true
with:
image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
shell: sh
options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
run: >
echo "install npm..." &&
export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
/work/scripts/ensure_node &&
echo "test icloudpd..." &&
npm install -g --unsafe-perm --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} &&
icloudpd --help
- name: Setup Node for Test
if: steps.get_image.outputs.digest != ''
uses: actions/setup-node@v4
with:
node-version: '5.x'
registry-url: 'http://localhost:4873'
env:
NODE_AUTH_TOKEN: "fake"

- name: Run test for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
- name: Run install global for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
if: steps.get_image.outputs.digest != ''
id: run_test
uses: addnab/docker-run-action@v3
continue-on-error: true
with:
image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
shell: bash
options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
run: >
echo "install npm..." &&
ls -la /work/scripts &&
export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
/work/scripts/npx_optional /work/compatibility/npm.${{ matrix.image[0] }}.${{ matrix.prop[0] }}.pass /work/compatibility/npm.${{ matrix.image[0] }}.${{ matrix.prop[0] }}.na -y --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} --help
run: >
echo "test icloudpd..." &&
npm install -g --unsafe-perm --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} &&
icloudpd --help
# - name: Run test for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
# if: steps.get_image.outputs.digest != ''
# id: run_test
# uses: addnab/docker-run-action@v3
# continue-on-error: true
# with:
# image: ${{ matrix.prop[2] }}${{ matrix.image[1] }}
# shell: bash
# options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.prop[1] }}
# run: >
# echo "install npm..." &&
# ls -la /work/scripts &&
# export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ${{ matrix.image[2] }} &&
# /work/scripts/npx_optional /work/compatibility/npm.${{ matrix.image[0] }}.${{ matrix.prop[0] }}.pass /work/compatibility/npm.${{ matrix.image[0] }}.${{ matrix.prop[0] }}.na -y --registry http://172.17.0.1:4873 icloudpd@${{inputs.icloudpd_version}} --help

- name: Record failure for ${{ matrix.prop[2] }}${{ matrix.image[1] }} on ${{ matrix.prop[1] }}
if: ${{ steps.run_test.outcome == 'failure' }}
Expand Down

0 comments on commit 086f97d

Please sign in to comment.