mirror of
https://github.com/SinTan1729/chhoto-url.git
synced 2025-12-05 21:10:23 -08:00
build: Run tests on pushes to non-main branches
This commit is contained in:
35
.github/workflows/rust-tests.yml
vendored
Normal file
35
.github/workflows/rust-tests.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["*"]
|
||||
paths: ["actix/**"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths: ["actix/**"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./actix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
actix/target
|
||||
actix/.cargo
|
||||
key: cargo-${{ runner.os }}-${{ hashFiles('actix/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-${{ runner.os }}-
|
||||
- name: Build
|
||||
run: cargo build
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
35
.github/workflows/rust_tests.yml
vendored
35
.github/workflows/rust_tests.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths: [ "actix/**" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths: [ "actix/**" ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./actix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
actix/target
|
||||
actix/.cargo
|
||||
key: cargo-${{ runner.os }}-${{ hashFiles('actix/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-${{ runner.os }}-
|
||||
- name: Build
|
||||
run: cargo build
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- SPDX-FileCopyrightText: 2023 Sayantan Santra <sayantan.santra689@gmail.com> -->
|
||||
<!-- SPDX-License-Identifier: MIT -->
|
||||
|
||||
[](https://github.com/SinTan1729/chhoto-url/actions/workflows/rust_tests.yml)
|
||||
[](https://github.com/SinTan1729/chhoto-url/actions/workflows/rust-tests.yml)
|
||||
[](https://hub.docker.com/r/sintan1729/chhoto-url)
|
||||
[](https://github.com/SinTan1729)
|
||||
[](https://github.com/SinTan1729/chhoto-url/releases/latest)
|
||||
|
||||
Reference in New Issue
Block a user