Update dependencies. #71
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: Development | |
on: [push] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: | |
- ubuntu | |
ruby: | |
- "3.3.5" | |
runs-on: ${{matrix.os}}-latest | |
services: | |
mariadb: | |
image: mariadb | |
ports: | |
- 3306:3306 | |
env: | |
MARIADB_USER: test | |
MARIADB_PASSWORD: test | |
MARIADB_DATABASE: test | |
MARIADB_ROOT_PASSWORD: test | |
options: >- | |
--health-cmd "healthcheck.sh --connect --innodb_initialized" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Installing dependencies | |
if: matrix.os == 'ubuntu' | |
run: | | |
sudo systemctl stop mysql | |
sudo apt-get install libmariadb-dev | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{matrix.ruby}} | |
bundler-cache: true | |
- name: Setup database | |
run: | | |
VARIANT=testing bundle exec bake migrate | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{matrix.ruby}} | |
bundler-cache: true | |
- name: Run tests... | |
run: bundle exec sus | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Push to remote system | |
env: | |
DEPLOY_KEY: ${{secrets.deploy_key}} | |
run: | | |
eval "$(ssh-agent -s)" | |
ssh-add - <<< $DEPLOY_KEY | |
mkdir ~/.ssh | |
ssh-keyscan -H mail.oriontransfer.net >> ~/.ssh/known_hosts | |
git push -f ssh://[email protected]/srv/http/mail.oriontransfer.net/ HEAD:main |