Skip to content

Close file after writing bytes #90

Close file after writing bytes

Close file after writing bytes #90

Workflow file for this run

name: Test
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake check
- name: Build
run: nix develop -c make build
- name: Test
run: nix develop -c make test
benchmark:
name: Performance benchmark
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake check
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install fixture node apps
run: |
cd $GITHUB_WORKSPACE/test/fixtures/example-react-app && yarn
cd $GITHUB_WORKSPACE/test/fixtures/example-react-app-libraries && yarn
- name: Run benchmark
run: |
set -o pipefail
nix develop -c make bench | tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark-v1
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: "fsdiff Benchmark"
tool: 'go'
output-file-path: output.txt
fail-on-alert: true
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true