mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
Update tests to pass on macOS arm64 (#11544)
This commit is contained in:
parent
8929caece6
commit
9b9d8eac09
6 changed files with 31 additions and 13 deletions
|
|
@ -14,10 +14,12 @@
|
|||
- include_tasks: run.yml
|
||||
vars:
|
||||
nodejs_version: '{{ item.node_version }}'
|
||||
nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_facts.system|lower }}-x{{ ansible_facts.userspace_bits }}'
|
||||
nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_facts.system|lower }}-{{ nodejs_arch }}'
|
||||
nodejs_arch: '{{ "x64" if ansible_architecture == "x86_64" else "arm64" if ansible_architecture in ("arm64", "aarch64") else ansible_architecture }}'
|
||||
nodejs_ext: '{{ ".tar.xz" if ansible_system == "Linux" else ".tar.gz" }}'
|
||||
nodejs_download: 'https://nodejs.org/dist/v{{ nodejs_version }}/{{ nodejs_path }}{{ nodejs_ext }}'
|
||||
yarn_version: '{{ item.yarn_version }}'
|
||||
with_items:
|
||||
- {node_version: 4.8.0, yarn_version: 1.6.0} # Lowest compatible nodejs version
|
||||
- {node_version: 8.0.0, yarn_version: 1.6.0}
|
||||
- {node_version: 16.20.2, yarn_version: 1.22.22} # oldest node version with macOS arm64 support
|
||||
when:
|
||||
- not (ansible_facts.os_family == 'Alpine') # TODO
|
||||
|
|
|
|||
|
|
@ -8,16 +8,20 @@
|
|||
path: /usr/local/lib/nodejs
|
||||
state: directory
|
||||
|
||||
- name: 'Download Nodejs'
|
||||
- name: Show Node.js Download URL
|
||||
debug:
|
||||
var: nodejs_download
|
||||
|
||||
- name: Download Node.js
|
||||
unarchive:
|
||||
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/{{ nodejs_path }}.tar.gz'
|
||||
src: '{{ nodejs_download }}'
|
||||
dest: '{{ remote_tmp_dir }}'
|
||||
remote_src: true
|
||||
creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz'
|
||||
|
||||
- name: 'Download Yarn'
|
||||
unarchive:
|
||||
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/yarn-v{{yarn_version}}.tar.gz'
|
||||
src: 'https://github.com/yarnpkg/yarn/releases/download/v{{yarn_version}}/yarn-v{{yarn_version}}.tar.gz'
|
||||
dest: '{{ remote_tmp_dir }}'
|
||||
remote_src: true
|
||||
creates: '{{ remote_tmp_dir }}/yarn-v{{yarn_version}}_pkg.tar.gz'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue