Skip to content

Commit

Permalink
Merge pull request #403 from martin-schulze-vireso/feature/prepare-v1…
Browse files Browse the repository at this point in the history
….3.0-release

Prepare v1.3.0 release
  • Loading branch information
martin-schulze-vireso committed Mar 15, 2021
2 parents bbd6bf9 + 9086c47 commit d038e67
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 16 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,31 @@ name: Release
on:
release: { types: [published] }
workflow_dispatch:
inputs:
version:
description: 'Version to simulate for deploy'
required: true

jobs:
version-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
EXPECTED_VERSION=${{ github.event.inputs.version }}
EXPECTED_VERSION=${EXPECTED_VERSION:-${GITHUB_REF/refs\/tags\//}}
echo "EXPECTED_VERSION=$EXPECTED_VERSION" >> $GITHUB_ENV
- name: Check tag version matches artifact versions
run: |
echo "Expected version: $EXPECTED_VERSION"
# use double negation to see the result unless we get a match
(./bin/bats --version | grep -F "$EXPECTED_VERSION") || (echo "Bats version check failed: "; ./bin/bats --version; exit -1)
(npm view . version | grep -F "$EXPECTED_VERSION") || (echo "npm version check failed: "; npm view . version; exit -1)
(grep '^Version:' 'contrib/rpm/bats.spec' | grep -F "$EXPECTED_VERSION") || (echo "debian package version check failed: "; grep '^Version:' 'contrib/rpm/bats.spec'; exit -1)
npmjs:
runs-on: ubuntu-latest
needs: version-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand All @@ -18,6 +39,7 @@ jobs:

github-npm:
runs-on: ubuntu-latest
needs: version-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand All @@ -28,3 +50,16 @@ jobs:
- run: npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dockerhub:
runs-on: ubuntu-latest
needs: version-check
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
file: ./Dockerfile
platforms: linux/amd64
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: bats/bats:${GITHUB_REF/refs\/tags\//}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[![Latest release](https://img.shields.io/github/release/bats-core/bats-core.svg)](https://github.com/bats-core/bats-core/releases/latest)
[![npm package](https://img.shields.io/npm/v/bats.svg)](https://www.npmjs.com/package/bats)
[![License](https://img.shields.io/github/license/bats-core/bats-core.svg)](https://github.com/bats-core/bats-core/blob/master/LICENSE.md)
[![Continuous integration status for Linux and macOS](https://img.shields.io/travis/bats-core/bats-core/master.svg?label=travis%20build)](https://travis-ci.org/bats-core/bats-core)
[![Continuous integration status for Windows](https://img.shields.io/appveyor/ci/bats-core/bats-core/master.svg?label=appveyor%20build)](https://ci.appveyor.com/project/bats-core/bats-core)
[[![Continuous integration status](https://github.com/bats-core/bats-core/workflows/Tests/badge.svg)](https://github.com/bats-core/bats-core/actions?query=workflow%3ATests)](https://github.com/bats-core/bats-core/actions?query=workflow%3ATests)
[![Read the docs status](https://readthedocs.org/projects/bats-core/badge/?version=latest&style=plastic)](https://bats-core.readthedocs.io)

[![Join the chat in bats-core/bats-core on gitter](https://badges.gitter.im/bats-core/bats-core.svg)][gitter]
Expand Down Expand Up @@ -63,7 +62,7 @@ each line is an assertion of truth.
bin/bats --tap test
```

See also the [CI](.travis.yml) settings for the current test environment and
See also the [CI](./.github/workflows/tests.yml) settings for the current test environment and
scripts.

## Support
Expand Down
1 change: 0 additions & 1 deletion contrib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ EOF

replace_in_files() {
declare -a FILE_REPLACEMENTS=(
".appveyor.yml,^version:"
"contrib/rpm/bats.spec,^Version:"
"libexec/bats-core/bats,^export BATS_VERSION="
"package.json,^ \"version\":"
Expand Down
2 changes: 1 addition & 1 deletion contrib/rpm/bats.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%global repo bats-core

Name: bats
Version: 1.2.1
Version: 1.3.0
Release: 1%{?dist}
Summary: Bash Automated Testing System

Expand Down
3 changes: 3 additions & 0 deletions docs/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD024": { "siblings_only": true }
}
75 changes: 70 additions & 5 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,92 @@ The format is based on [Keep a Changelog][kac] and this project adheres to
[kac]: https://keepachangelog.com/en/1.0.0/
[semver]: https://semver.org/

## [Unreleased]

## [1.3.0] - 2021-03-08

### Added

* custom test-file extension via `BATS_FILE_EXTENSION` when searching for test
files in a directory (#376)
* TAP13 formatter, including millisecond timing (#337)
* automatic release to NPM via Github Actions (#406)

#### Documentation

* added documentation about overusing `run` (#343)
* improved documentation of `load` (#332)

### Changed

* recursive suite mode will follow symlinks now (#370)
* split options for (file-) `--report-formatter` and (stdout) `--formatter` (#345)
* **WARNING**: This changes the meaning of `--formatter junit`.
stdout will now show unified xml instead of TAP. From now on, please use
`--report-formatter junit` to obtain the `.xml` report file!
* removed `--parallel-preserve-environment` flag, as this is the default
behavior (#324)
* moved CI from Travis/Appveyor to Github Actions (#405)
* preprocessed files are no longer removed if `--no-tempdir-cleanup` is
specified (#395)

#### Documentation

* moved documentation to [readthedocs](https://bats-core.readthedocs.io/en/latest/)

### Fixed

#### Correctness

* fix internal failures due to unbound variables when test files use `set -u` (#392)
* fix internal failures due to changes to `$PATH` in test files (#387)
* fix test duration always being 0 on busybox installs (#363)
* fix hangs on CTRL+C (#354)
* make `BATS_TEST_NUMBER` count per file again (#326)
* include `lib/` in npm package (#352)

#### Performance

* don't fork bomb in parallel mode (#339)
* preprocess each file only once (#335)
* avoid running duplicate files n^2 times (#338)

#### Documentation

* fix documentation for `--formatter junit` (#334)
* fix documentation for `setup_file` variables (#333)
* fix link to examples page (#331)
* fix link to "File Descriptor 3" section (#301)

## [1.2.1] - 2020-07-06

### Added
* JUnit output and extensible formatter rewrite (#246)

* JUnit output and extensible formatter rewrite (#246)
* `load` function now reads from absolute and relative paths, and $PATH (#282)
* Beginner-friendly examples in /docs/examples (#243)
* @peshay's `bats-file` fork contributed to `bats-core/bats-file` (#276)
* @peshay's `bats-file` fork contributed to `bats-core/bats-file` (#276)

### Changed

* Duplicate test names now error (previous behaviour was to issue a warning) (#286)
* Changed default formatter in Docker to pretty by adding `ncurses` to Dockerfile, override with `--tap` (#239)
* Changed default formatter in Docker to pretty by adding `ncurses` to
Dockerfile, override with `--tap` (#239)
* Replace "readlink -f" dependency with Bash solution (#217)

## [1.2.0] - 2020-04-25

Support parallel suite execution and filtering by test name.

### Added

* docs/CHANGELOG.md and docs/releasing.md (#122)
* The `-f, --filter` flag to run only the tests matching a regular expression (#126)
* Optimize stack trace capture (#138)
* `--jobs n` flag to support parallel execution of tests with GNU parallel (#172)

### Changed

* AppVeyor builds are now semver-compliant (#123)
* Add Bash 5 as test target (#181)
* Always use upper case signal names to avoid locale dependent err… (#215)
Expand All @@ -44,16 +106,19 @@ Support parallel suite execution and filtering by test name.
This is the first release with new features relative to the original Bats 0.4.0.

### Added

* The `-r, --recursive` flag to scan directory arguments recursively for
`*.bats` files (#109)
* The `contrib/rpm/bats.spec` file to build RPMs (#111)

### Changed

* Travis exercises latest versions of Bash from 3.2 through 4.4 (#116, #117)
* Error output highlights invalid command line options (#45, #46, #118)
* Replaced `echo` with `printf` (#120)

### Fixed

* Fixed `BATS_ERROR_STATUS` getting lost when `bats_error_trap` fired multiple
times under Bash 4.2.x (#110)
* Updated `bin/bats` symlink resolution, handling the case on CentOS where
Expand Down Expand Up @@ -85,8 +150,8 @@ This is the first release with new features relative to the original Bats 0.4.0.
`1.0.0` generally preserves compatibility with `0.4.0`, but with some Bash
compatibility improvements and a massive performance boost. In other words:

- all existing tests should remain compatible
- tests that might've failed or exhibited unexpected behavior on earlier
* all existing tests should remain compatible
* tests that might've failed or exhibited unexpected behavior on earlier
versions of Bash should now also pass or behave as expected

Changes:
Expand Down
3 changes: 1 addition & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ your own fork of the repository and issuing pull requests to the original.

## Testing

- Continuous integration status for Linux and macOS: [![Build Status on Travis](https://travis-ci.org/bats-core/bats-core.svg?branch=ci-configs)](https://travis-ci.org/bats-core/bats-core)
- Continuous integration status for Windows: [![Build status on AppVeyor](https://ci.appveyor.com/api/projects/status/tokwm9t9jp5fe7af?svg=true)](https://ci.appveyor.com/project/bats-core/bats-core)
- Continuous integration status: [![Tests](https://github.com/bats-core/bats-core/workflows/Tests/badge.svg)](https://github.com/bats-core/bats-core/actions?query=workflow%3ATests)

## Coding conventions

Expand Down
1 change: 0 additions & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ significant updates to the new version.

Bump the version numbers in the following files:

- .appveyor.yml
- contrib/rpm/bats.spec
- libexec/bats-core/bats
- package.json
Expand Down
2 changes: 1 addition & 1 deletion libexec/bats-core/bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

export BATS_VERSION='1.2.1'
export BATS_VERSION='1.3.0'
VALID_FORMATTERS="pretty, junit, tap, tap13"

version() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bats",
"version": "1.2.1",
"version": "1.3.0",
"description": "Bash Automated Testing System",
"homepage": "https://github.com/bats-core/bats-core#readme",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion test/install.bats
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ setup() {
# by creating a wrapper script that executes bin/bats via a relative path.
#
# root.bats contains tests that use real symlinks on platforms that support
# them, as does the .travis.yml script that exercises the Dockerfile.
# them.
local bats_symlink="$INSTALL_DIR/bin/bats-link"
printf '%s\n' '#! /usr/bin/env bash' \
"cd '$INSTALL_DIR/bin'" \
Expand Down

0 comments on commit d038e67

Please sign in to comment.