Skip to content

feat(http): add http module #62

feat(http): add http module

feat(http): add http module #62

Workflow file for this run

name: CI
on:
push:
branches: [main, "*.x"]
pull_request:
branches: [main, "*.x"]
env:
DENO_DIR: .deno
DENO_VERSION: v1.x
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
# Configure the GitHub Actions runner to use Linux-style line endings before
# running the `actions/checkout` step due to a known issue with handling
# Windows-style line endings (CRLF)
# https://github.com/actions/checkout/issues/135
- name: Setup line endings (LF)
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3
- name: Setup Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Restore dependencies
uses: actions/cache@v3
with:
path: ${{ env.DENO_DIR }}
key: dependencies-${{ hashFiles('deno.lock') }}
- name: Execute tests
run: deno task test
- name: Generate test coverage report
if: matrix.os == 'ubuntu-latest'
run: deno coverage ./cov --lcov > cov.lcov
- name: Upload test coverage report
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.os }}
files: cov.lcov
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Type check
run: deno task check
- name: Format check
run: deno fmt --check
- name: Lint check
run: deno lint