Skip to content

Add deleteFile function (#30) #48

Add deleteFile function (#30)

Add deleteFile function (#30) #48

Workflow file for this run

# Copyright 2022 Heath Stewart.
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
name: ci
on:
pull_request:
push:
branches:
- main
workflow_call:
inputs:
release:
description: Whether this is running as part of a release workflow.
required: false
type: boolean
default: false
defaults:
run:
shell: bash
env:
GOVERSION: "1.19"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
goos: windows
lint: true
- os: ubuntu-latest
goos: linux
lint: true
- os: macos-latest
goos: darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go ${{ env.GOVERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
cache: false # Set to `true` when dependencies are added.
- name: Test
# Set global user config for tests.
run: |
git config --global user.name "GitHub Actions"
git config --global user.email actions@github.com
GOOS=${{ matrix.goos }} go test ./... -cover -v
- name: Lint
if: ${{ !cancelled() && matrix.lint }}
# cspell:ignore golangci
uses: golangci/golangci-lint-action@v4
with:
only-new-issues: true
skip-pkg-cache: true
check:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- test
steps:
- name: Check
run: |
if [[ "${{ needs.test.result }}" == "success" ]]; then
echo -e "\e[32mSuccess\e[0m"
else
echo -e "\e[31mFailed\e[0m"
exit 1
fi