mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-07 20:20:26 -03:00
test: github workflows
This commit is contained in:
parent
9a2ebc6c12
commit
9136ff9768
20
.github/workflows/ci.yml
vendored
Normal file
20
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install Crystal
|
||||||
|
uses: crystal-lang/install-crystal@v1
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
shards install
|
||||||
|
crystal tool format --check
|
||||||
|
crystal spec -v
|
26
.github/workflows/coverage.yml
vendored
Normal file
26
.github/workflows/coverage.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Coverage
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 1 * * *"
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install Crystal
|
||||||
|
uses: crystal-lang/install-crystal@v1
|
||||||
|
- name: Run tests using kcov
|
||||||
|
run: |
|
||||||
|
sudo apt update && sudo apt install kcov
|
||||||
|
shards install
|
||||||
|
crystal build src/run_tests.cr
|
||||||
|
kcov --clean --include-path=./src coverage ./run_tests
|
||||||
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||||
|
chmod +x codecov
|
||||||
|
./codecov -t ${CODECOV_TOKEN} -s coverage
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
20
.github/workflows/mutation.yml
vendored
Normal file
20
.github/workflows/mutation.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Mutation Tests
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download source
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Crystal
|
||||||
|
uses: crystal-lang/install-crystal@v1
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
shards install
|
||||||
|
bin/crytic test -s src/hace.cr
|
Loading…
x
Reference in New Issue
Block a user