ci: Add a GitHub workflow for CI. #10
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 | |
on: | |
push: | |
# Filter on branch so we don't double-run this workflow on a PR's push. | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
permissions: | |
# "none-all", which doesn't exist, but | |
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow | |
# implies that the token still gets created. Elsewhere we learn that any | |
# permission not mentioned here gets turned to `none`. So this removes all permissions. | |
actions: none | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout | |
- name: install dependencies | |
run: sudo apt-get install -y flex bison | |
- name: build | |
run: ./configure --enable-gcov && make all | |
- name: test | |
run: make check | |
- uses: codecov/codecov-action@3 | |
if: always() | |
with: | |
gcov: true | |
directory: . |