Merge pull request #21 from pcvg/github-workflows-update #70
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: Test | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev | |
npm install | |
- name: Run test | |
run: npm test | |
env: | |
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}" | |
linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev | |
npm install | |
- name: Run linters | |
run: npm run lint | |
notify-failure: | |
runs-on: ubuntu-latest | |
needs: [test,linters] | |
if: failure() | |
name: Notify-Failure | |
steps: | |
- name: Notify | |
uses: pcvg/slack-notification-action@master | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
JOB_STATUS: Failure | |
TITLE_MSG_FAIL: "Workflow failed - Zvezdochki!" | |
URL_WORKFLOW: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks" | |
FOOTER_MSG_FAIL: "Failed - ${{ github.actor }}'s workflow in <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.repository }}>" |