Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 29 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,43 @@ name: CI

on:
push:
branches: [ master, main ]
branches: [main, master]
pull_request:
branches: [ master, main ]
branches: [main, master]

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ['1.22', '1.23']
go: ['1.21', '1.22', '1.23']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Download dependencies
run: go mod download

- name: Run go vet
run: go vet ./...

- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "The following files are not formatted:"
gofmt -l .
exit 1
fi

- name: Run tests
run: go test -v -race -timeout=10m ./...

- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.23'
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.23'
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Build
run: go build -v ./...
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Download dependencies
run: go mod download

- name: Run tests (with coverage)
if: matrix.os == 'ubuntu-latest'
run: go test -v -race -coverprofile=coverage.out ./...

- name: Run tests
if: matrix.os != 'ubuntu-latest'
run: go test -v -race ./...

- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.23'
uses: codecov/codecov-action@v4
with:
files: coverage.out
fail_ci_if_error: false
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# httpfs

[![CI](https://github.com/absfs/httpfs/actions/workflows/ci.yml/badge.svg)](https://github.com/absfs/httpfs/actions/workflows/ci.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/absfs/httpfs.svg)](https://pkg.go.dev/github.com/absfs/httpfs)
[![Go Report Card](https://goreportcard.com/badge/github.com/absfs/httpfs)](https://goreportcard.com/report/github.com/absfs/httpfs)
[![GoDoc](https://godoc.org/github.com/absfs/httpfs?status.svg)](https://godoc.org/github.com/absfs/httpfs)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI](https://github.com/absfs/httpfs/actions/workflows/ci.yml/badge.svg)](https://github.com/absfs/httpfs/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

The `httpfs` package implements a `net/http` FileSystem interface compatible object that includes both file reading and file writing operations. It provides a bridge between the [absfs](https://github.com/absfs/absfs) filesystem abstraction and Go's standard `http.FileServer`.

Expand Down
Loading