This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Feature/sessions #81
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: [ "dev", "main" ] | |
pull_request: | |
branches: [ "dev", "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Prepare | |
run: cp ./.env.example ./.env | |
- name: Install ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.2.0' | |
- uses: satackey/[email protected] | |
continue-on-error: true | |
- name: Build image | |
run: make ci-build | |
- name: Save image | |
run: docker save --output /tmp/bmstu_2024-app.tar bmstu_2024-app | |
- name: Upload image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bmstu_2024-app | |
path: /tmp/bmstu_2024-app.tar | |
- name: Clear | |
run: make ci-clear | |
codestyle: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Prepare | |
run: cp ./.env.example ./.env | |
- name: Download image | |
uses: actions/download-artifact@v4 | |
with: | |
name: bmstu_2024-app | |
path: /tmp | |
- name: Load container | |
run: docker load --input /tmp/bmstu_2024-app.tar | |
- name: Check codestyle | |
run: make ci-rubocop | |
- name: Clear | |
run: make ci-clear | |
# healthcheck: | |
# runs-on: ubuntu-latest | |
# needs: build | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# - name: Prepare | |
# run: cp ./.env.example ./.env | |
# - name: Download image | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: bmstu_2024-app | |
# path: /tmp | |
# - name: Load container | |
# run: docker load --input /tmp/bmstu_2024-app.tar | |
# - name: Healthcheck | |
# run: make ci-up-healthy |