CI/CD #140
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: CI/CD | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
schedule: | |
- cron: "40 2 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Once the CI/CD builds got working, didn't bother testing without these ... | |
# not sure if they're actually needed: | |
env: | |
JQ_LIB_DIR: /lib/x86_64-linux-gnu | |
ONIG_LIB_DIR: /lib/x86_64-linux-gnu | |
LD_LIBRARY_PATH: /lib/x86_64-linux-gnu | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Updates | |
run: | | |
make deps | |
sudo apt-get install libjq-dev libonig-dev | |
- name: Build | |
run: make build | |
- name: Lint | |
run: make cicd-lint | |
- name: Run tests | |
run: make test | |
- name: Build docs | |
run: make docs | |
- name: Run mdsplode (locally) | |
run: ./tests/mdsplode_dev.sh | |
- name: Install mdsplode (crates.io) | |
run: cargo install mdsplode | |
- name: Run mdsplode | |
run: ./tests/mdsplode.sh | |
- name: Notify CI/CD Slack Channel | |
uses: innocarpe/actions-slack@v1 | |
with: | |
status: ${{ job.status }} | |
success_text: '✅ Build for ${{ github.repository }} succeeded! 😄🌈🐴🚢🐿 (commit id: ${{ github.sha }})' | |
failure_text: '❌ Build for ${{ github.repository }} failed! 🤬💣🔥🚒 (commit id: ${{ github.sha }})' | |
cancelled_text: '🚧 Build for ${{ github.repository }} was cancelled ... 😯🦡 (commit id: ${{ github.sha }})' | |
env: | |
GITHUB_TOKEN: ${{ secrets.CICD_BOT_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.CICD_BOT_WEBHOOK }} | |
if: always() |