Skip to content

CI

CI #872

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
recursivefs:
name: recursivefs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: Download dependencies
run: go mod download
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --verbose --config .github/.golangci.yml --enable gofmt --enable goimports
if: matrix.os != 'windows-latest'
- name: Lint Windows
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --verbose --config .github/.golangci.yml
if: matrix.os == 'windows-latest'
- name: Test
run: go test -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic .
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: matrix.os == 'windows-latest'
fs:
name: fs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: Download dependencies
run: go mod download
- name: Setup node
uses: actions/setup-node@v3
with: {node-version: '10.x'}
- name: Install bats
run: npm install -g bats@1.1.0
- name: Build
run: |
go build .
go install .
mkdir bin
mv fs* bin
working-directory: ./cmd/fs
shell: bash
- name: Bats test
run: bats testdata/fs.bats
shell: bash
- name: Upload
uses: actions/upload-artifact@master
with:
name: fs ${{ matrix.os }}
path: cmd/fs/bin