Test Provisioning #245
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Provisioning | |
# Provisioning tests are expensive, so we should only run them on master merges | |
# (until later determined to be insufficent) | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'Dockerfile' | |
- 'docs/**' | |
- '*.hcl' | |
- '*.md' | |
schedule: | |
# Fridays at midnight | |
- cron: '0 0 * * 5' | |
jobs: | |
macos-provision: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install crystal and tool dependencies | |
run: brew install crystal meson openssl@3 | |
- name: Install dependencies | |
run: shards install | |
- name: Build mstrap | |
run: make build STATIC=1 | |
# Based on https://raw.githubusercontent.com/MikeMcQuaid/strap/master/.github/workflows/tests.yml | |
- name: Run brew bot's cleanup | |
run: brew test-bot --only-cleanup-before | |
- name: Make macOS like new | |
run: | | |
sudo rm -rf /usr/local/bin/brew /usr/local/.??* \ | |
/usr/local/Homebrew /usr/local/Caskroom \ | |
/Library/Developer/CommandLineTools | |
- name: Run mstrap | |
env: | |
STRAP_CI: true | |
run: | | |
bin/mstrap --debug \ | |
--config ${{ secrets.TEST_CONFIG_URL }} | |
- name: Install required dependencies for ruby | |
run: | | |
brew install gmp | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: spec/provisioning | |
- name: Run serverspecs | |
env: | |
BUNDLE_DEPLOYMENT: true | |
run: | | |
source ~/.mstrap/env.sh && make check-provisioning | |
ubuntu-provision: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add Crystal repos | |
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash | |
- name: Install crystal and tool dependencies | |
run: | | |
sudo apt install -y crystal libevent-dev libpcre2-dev libssl-dev \ | |
curl ninja-build \ | |
ruby ruby-bundler | |
sudo apt purge meson | |
sudo pip3 install meson | |
- name: Install dependencies | |
run: shards install | |
- name: Build mstrap | |
run: make build | |
- name: Make Ubuntu like new | |
run: | | |
sudo rm -rf /home/linuxbrew/.linuxbrew | |
sudo apt remove --purge build-essential file | |
sudo apt update | |
sudo apt install curl | |
- name: Run mstrap | |
env: | |
SHELL: /bin/bash | |
STRAP_CI: true | |
run: | | |
bin/mstrap --debug \ | |
--config ${{ secrets.TEST_CONFIG_URL }} | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: spec/provisioning | |
- name: Run serverspecs | |
env: | |
SHELL: /bin/bash | |
BUNDLE_DEPLOYMENT: true | |
run: | | |
source ~/.mstrap/env.sh && make check-provisioning |