mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
132 lines
3.8 KiB
YAML
132 lines
3.8 KiB
YAML
# yamllint disable rule:line-length
|
|
---
|
|
name: 'Kitchen (MacOS)'
|
|
'on': ['push', 'pull_request']
|
|
|
|
env:
|
|
KITCHEN_LOCAL_YAML: 'kitchen.macos.yml'
|
|
|
|
jobs:
|
|
generate-actions-workflow:
|
|
name: 'Generate The Actions Workflow'
|
|
runs-on: 'ubuntu-latest'
|
|
steps:
|
|
- uses: 'actions/checkout@v1'
|
|
- name: 'Set up Python 3.7'
|
|
uses: 'actions/setup-python@v1'
|
|
with:
|
|
python-version: 3.7
|
|
- name: 'Install Pre-Commit'
|
|
run: |
|
|
pip install -U pip
|
|
pip install pre-commit
|
|
pre-commit install
|
|
- name: 'Generate Workflow Actions'
|
|
run: |
|
|
pre-commit run -av generate-actions-workflow
|
|
lint:
|
|
name: 'Lint'
|
|
runs-on: 'ubuntu-latest'
|
|
needs: 'generate-actions-workflow'
|
|
container: 'koalaman/shellcheck-alpine:v0.6.0'
|
|
steps:
|
|
- uses: 'actions/checkout@v1'
|
|
- name: 'ShellCheck'
|
|
run: |
|
|
shellcheck -s sh -f tty bootstrap-salt.sh
|
|
test-12:
|
|
runs-on: 'macos-12'
|
|
timeout-minutes: 20
|
|
needs: 'lint'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
instance:
|
|
- latest-macos-12
|
|
- py3-stable-3004-macos-12
|
|
- py3-stable-3003-macos-12
|
|
- py3-stable-3002-macos-12
|
|
steps:
|
|
- name: 'Check out code'
|
|
uses: 'actions/checkout@v2'
|
|
- name: 'Set up Bundler cache'
|
|
uses: 'actions/cache@v1'
|
|
with:
|
|
path: 'vendor/bundle'
|
|
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
|
|
restore-keys: "${{ runner.os }}-gems-"
|
|
- name: 'Run Bundler'
|
|
run: |
|
|
ruby --version
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4 --retry 3
|
|
- name: 'Install Python Dependencies'
|
|
run: |
|
|
pip3 install -U pip
|
|
pip3 install -r tests/requirements.txt
|
|
- name: 'Run Test Kitchen'
|
|
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|
|
test-11:
|
|
runs-on: 'macos-11'
|
|
timeout-minutes: 20
|
|
needs: 'lint'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
instance:
|
|
- latest-macos-11
|
|
- py3-stable-3004-macos-11
|
|
- py3-stable-3003-macos-11
|
|
- py3-stable-3002-macos-11
|
|
steps:
|
|
- name: 'Check out code'
|
|
uses: 'actions/checkout@v2'
|
|
- name: 'Set up Bundler cache'
|
|
uses: 'actions/cache@v1'
|
|
with:
|
|
path: 'vendor/bundle'
|
|
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
|
|
restore-keys: "${{ runner.os }}-gems-"
|
|
- name: 'Run Bundler'
|
|
run: |
|
|
ruby --version
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4 --retry 3
|
|
- name: 'Install Python Dependencies'
|
|
run: |
|
|
pip3 install -U pip
|
|
pip3 install -r tests/requirements.txt
|
|
- name: 'Run Test Kitchen'
|
|
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|
|
test-1015:
|
|
runs-on: 'macos-10.15'
|
|
timeout-minutes: 20
|
|
needs: 'lint'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
instance:
|
|
- latest-macos-1015
|
|
- py3-stable-3004-macos-1015
|
|
- py3-stable-3003-macos-1015
|
|
- py3-stable-3002-macos-1015
|
|
steps:
|
|
- name: 'Check out code'
|
|
uses: 'actions/checkout@v2'
|
|
- name: 'Set up Bundler cache'
|
|
uses: 'actions/cache@v1'
|
|
with:
|
|
path: 'vendor/bundle'
|
|
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
|
|
restore-keys: "${{ runner.os }}-gems-"
|
|
- name: 'Run Bundler'
|
|
run: |
|
|
ruby --version
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4 --retry 3
|
|
- name: 'Install Python Dependencies'
|
|
run: |
|
|
pip3 install -U pip
|
|
pip3 install -r tests/requirements.txt
|
|
- name: 'Run Test Kitchen'
|
|
run: 'bundle exec kitchen test ${{ matrix.instance }}'
|