Skip to content

Files

Files #110

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: ["v*.*.*"]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
nim-version: [ "2.0.x" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: ${{ matrix.nim-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: nimble unittests
- name: Run integation tests
# go-httpbin container does not run on windows runner for some reason. macos runner does not has docker by default
if: ${{ matrix.os == 'ubuntu-latest' }}
run: nimble inttests
deploy-docs:
needs:
- build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: "2.0.8"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docs
run: nim -d:ssl --outdir:./htmldocs doc --project src/yahttp.nim
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './htmldocs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4