build #200
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: build | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
schedule: | |
- cron: "19 2 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: cargo build | |
- name: Lint | |
run: make cicd-lint | |
- name: Run tests | |
run: cargo test | |
- name: Run Demo (color, file, line) | |
run: cargo run --example=colour-caller | |
- name: Run Demo (color) | |
run: cargo run --example=no-caller | |
- name: Run Demo (no color) | |
run: cargo run --example=no-colour | |
- 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() |