Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TDacik committed Jan 20, 2025
1 parent 1daac00 commit 857a8cd
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 35 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run tests

on: [push, pull_request]

jobs:

setup:
uses: ./.github/workflows/setup.yml

deploy-doc:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
id-token: write
pages: write

steps:
- name: Build documentation
run: opam exec -- dune build @doc

- name: Set-up Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/default/_doc/_html

- name: Deploy odoc to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
36 changes: 1 addition & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,11 @@ on: [push, pull_request]

jobs:

unit-tests:
setup:
uses: ./.github/workflows/setup.yml
runs-on: ubuntu-latest
steps:
- name: Run unit tests
run: opam exec -- dune runtest

regression-tests:
uses: ./.github/workflows/setup.yml
runs-on: ubuntu-latest
steps:
- name: Run regression tests
run: python3 scripts/run_tests.py

deploy-doc:
uses: ./.github/workflows/setup.yml
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
id-token: write
pages: write

steps:
- name: Build documentation
run: opam exec -- dune build @doc

- name: Set-up Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/default/_doc/_html

- name: Deploy odoc to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 14 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Run tests

on: [push, pull_request]

jobs:

setup:
uses: ./.github/workflows/setup.yml

unit-tests:
runs-on: ubuntu-latest
steps:
- name: Run unit tests
run: opam exec -- dune runtest

0 comments on commit 857a8cd

Please sign in to comment.