name: CI

on:
  push:
    branches:
      - main
    tags: '*'
    paths:
      - 'src/**'
      - 'test/**'
      - 'docs/**'
      - '.github/workflows/CI.yml'
      - 'Project.toml'
  pull_request:
    paths:
      - 'src/**'
      - 'test/**'
      - 'docs/**'
      - '.github/workflows/CI.yml'
      - 'Project.toml'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Julia
      uses: julia-actions/setup-julia@v1
      with:
        version: '1.6'
    - name: Install Dependencies
      run: julia -e 'using Pkg; Pkg.instantiate()'
    - name: Run Tests
      run: julia -e 'using Pkg; Pkg.test("Celerite2")'
