Merge pull request #1 from carsdotcom/relax_geo_dependency #12
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
name: "test ${{ matrix.db }} ${{ matrix.pair.elixir }}/${{ matrix.pair.otp }} ${{ matrix.lint }}" | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
db: | |
- mysql:5.6 | |
- mysql:5.7 | |
- mysql:8.3 | |
- mariadb:10.11 | |
pair: | |
- elixir: 1.11.3 | |
otp: 23.2.5 | |
- elixir: 1.16.3 | |
otp: 26.2.5 | |
env: | |
MIX_ENV: test | |
DB: ${{ matrix.db }} | |
MYSQL_UNIX_PORT: /var/run/mysqld/mysqld.sock | |
steps: | |
- run: sudo mkdir -p /var/run/mysqld | |
- run: sudo chmod 777 /var/run/mysqld | |
- run: docker run -p 3306:3306 --volume /var/run/mysqld:/var/run/mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=1 --detach ${{matrix.db}} --innodb_log_file_size=1G | |
- run: until mysql --port 3306 --protocol=tcp -u root -e "SELECT @@version;"; do sleep 3; done | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.pair.otp}} | |
elixir-version: ${{matrix.pair.elixir}} | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }} | |
- run: mix deps.get | |
- run: mix format --check-formatted | |
if: ${{ matrix.lint }} | |
- run: mix deps.unlock --check-unused | |
if: ${{ matrix.lint }} | |
- run: mix deps.compile | |
- run: mix compile --warnings-as-errors | |
if: ${{ matrix.lint }} | |
- run: mix test |