diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml deleted file mode 100644 index d743609..0000000 --- a/.github/workflows/ci-cd.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: CI/CD - -on: - pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58f9c59..e037043 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,58 +3,51 @@ name: CI on: workflow_dispatch: pull_request: - branches: - - main - push: branches: - main - tags: - - 'v0.[0-9]+.[0-9]+' - - 'v0.[0-9]+.[0-9]+-beta.[0-9]+' - - 'v0.[0-9]+.[0-9]+-alpha.[0-9]+' jobs: build: runs-on: ubuntu-latest services: - mysql: - image: mysql:latest - env: - MYSQL_ROOT_PASSWORD: my-secret-pw - MYSQL_DATABASE: keyv_test - MYSQL_USER: user - MYSQL_PASSWORD: password - ports: - - 3306:3306 - options: >- - --health-cmd="mysqladmin ping -h localhost" - --health-interval=10s - --health-timeout=5s - --health-retries=5 + mysql: + image: mysql:latest + env: + MYSQL_ROOT_PASSWORD: my-secret-pw + MYSQL_DATABASE: keyv_test + MYSQL_USER: user + MYSQL_PASSWORD: password + ports: + - 3306:3306 + options: >- + --health-cmd="mysqladmin ping -h localhost" + --health-interval=10s + --health-timeout=5s + --health-retries=5 - postgres: - image: postgres:latest - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: keyv_test - ports: - - 5432:5432 - options: >- - --health-cmd="pg_isready -U postgres" - --health-interval=10s - --health-timeout=5s - --health-retries=5 + postgres: + image: postgres:latest + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: keyv_test + ports: + - 5432:5432 + options: >- + --health-cmd="pg_isready -U postgres" + --health-interval=10s + --health-timeout=5s + --health-retries=5 - redis: - image: redis:latest - ports: - - 6379:6379 - options: >- - --health-cmd="redis-cli ping" - --health-interval=10s - --health-timeout=5s - --health-retries=5 + redis: + image: redis:latest + ports: + - 6379:6379 + options: >- + --health-cmd="redis-cli ping" + --health-interval=10s + --health-timeout=5s + --health-retries=5 env: # emit backtraces on panics. @@ -99,4 +92,3 @@ jobs: with: command: test args: --release --all-features -