Skip to content

update-snaps

update-snaps #9

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
testsuite:
runs-on: ubuntu-22.04
# strategy:
# fail-fast: false
# matrix:
# db-type: [sqlite, pgsql, mariadb, mysql]
steps:
# - name: Setup MySQL 8.0
# if: matrix.db-type == 'mysql'
# run: |
# sudo service mysql start
# mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE gleam_cake;'
- name: Setup PostgreSQL latest
# if: matrix.db-type == 'pgsql'
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=gleam_cake -p 5432:5432 -d postgres
- uses: getong/mariadb-action@v1.1
# if: matrix.db-type == 'mariadb'
with:
mysql database: "gleam_cake"
mysql root password: "root"
- uses: actions/checkout@v4
- name: Get date part for cache key
id: key-date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
- uses: erlef/setup-beam@v1
with:
otp-version: "27.0"
gleam-version: "1.2.1"
rebar3-version: "3"
- name: Get Gleam deps
run: gleam deps download
- name: Wait for MariaDB and MySQL
# if: matrix.db-type == 'mysql' || matrix.db-type == 'mariadb'
run: while ! `mysqladmin ping -h 127.0.0.1 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done;
- name: Test suite
run: gleam test --target erlang
- name: Code format check
run: gleam format --check src test