CI simplification #261
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: Checks | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
load: true | |
tags: reverser | |
# What a joke: https://stackoverflow.com/questions/74825294 | |
- name: Set env variables | |
run: | | |
echo "REVERSER_DATA_PATH=${{ env.RUNNER_TEMP }}/${{ env.GITHUB_REPOSITORY_ID }}" >> $GITHUB_ENV | |
- name: Create DB | |
run: docker compose run reverser bin/setup | |
- name: Run Tests | |
run: docker compose run reverser tests | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run Rubocop | |
run: bundle exec rubocop --format github | |
docker-checks: | |
runs-on: ubuntu-latest | |
name: Run ${{ matrix.service }} | |
strategy: | |
fail-fast: false | |
matrix: | |
service: [yamllint, csslint, tslint] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ${{ matrix.service }} | |
run: docker compose run ${{ matrix.service }} |