Skip to content

Commit

Permalink
Revert "Attempt to make CI faster" (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbalser authored May 9, 2024
1 parent 9d3f438 commit a6d1430
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 212 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/CI.yml

This file was deleted.

157 changes: 0 additions & 157 deletions .github/workflows/Tests.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]
tags: ["*"]

env:
CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10

jobs:
build:
runs-on: oracles-20.04

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

- name: Setup cache
uses: Swatinem/rust-cache@v2

- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Build
run: cargo build --all --release

- name: Check formatting
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy --all-targets -- -Dclippy::all -D warnings

- name: Run unit and integration tests
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
run: cargo test -r -- --include-ignored

- name: Debian packaging
if: contains(github.ref, 'refs/tags/')
env:
PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }}
run: |
chmod +x ./.github/scripts/make_debian.sh
./.github/scripts/make_debian.sh

0 comments on commit a6d1430

Please sign in to comment.