First save in database #17
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: Backend CI | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- "*" | |
jobs: | |
format: | |
name: Rust CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup cargo | |
uses: ./.github/actions/cargo-setup | |
- name: Setup clippy | |
run: rustup component add clippy | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt,clippy | |
override: true | |
- name: Check code formatting | |
run: cargo +nightly fmt -- --check | |
- name: Run clippy | |
run: cargo clippy | |
- name: Compile application | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Test application | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
# unit_tests: | |
# name: Unit tests | |
# runs-on: ubuntu-latest-4-cores | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# | |
# - name: Setup cargo | |
# uses: ./.github/actions/cargo-setup | |
# | |
# - name: Setup environment | |
# uses: ./.github/actions/env-setup | |
# | |
# - name: Run migrations | |
# uses: ./.github/actions/migrations-run | |
# | |
# - name: Run tests | |
# uses: ./.github/actions/coverage-checks | |
# | |
# - name: Setup tmate session for debugging | |
# uses: mxschmitt/action-tmate@v3 | |
# if: ${{ failure() && inputs.debug_enabled }} | |
# | |
# - name: Upload coverage results | |
# uses: ./.github/actions/coverage-upload | |
# with: | |
# codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
# codecov_flag: unittest | |
# file: cobertura.xml |