Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

chore: remove Circle-CI, fix GHA #2295

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
112 changes: 0 additions & 112 deletions .circleci/config.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: run-docs-test
name: run-docs-tests

on: push
on: [push, pull_request]
# here add directory listing on push to test
# paths:
# - /docs/*.rst
Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
node-version: [12.x]

steps:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
node-version: [12.x]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
node-version: [12.x]

steps:
Expand All @@ -32,7 +32,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
node-version: [12.x]

steps:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/run-lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: run-lints

on: [push, pull_request]

jobs:
lint:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn prettify:check
27 changes: 27 additions & 0 deletions .github/workflows/run-smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: run-smoke-tests

on: [push, pull_request]

jobs:
test-smoke:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]

services:
mongo:
image: mongo:4.4
ports: ["27017:27017"]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn test:smoke
9 changes: 2 additions & 7 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: run-tests

name: run-test

on: push
on: [push, pull_request]

jobs:
# general test run
test:

runs-on: ${{ matrix.os }}
Expand All @@ -24,5 +20,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn lint
- run: yarn test
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Dredd β€” HTTP API Testing Framework

[![npm version](https://badge.fury.io/js/dredd.svg)](https://www.npmjs.com/package/dredd)
[![Build Status](https://circleci.com/gh/apiaryio/dredd/tree/master.svg?style=svg)](https://circleci.com/gh/apiaryio/dredd/tree/master)
[![Tests](https://github.com/apiaryio/dredd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-tests.yml)
[![E2E Tests](https://github.com/apiaryio/dredd/actions/workflows/run-e2e-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-e2e-tests.yml)
[![Smoke Tests](https://github.com/apiaryio/dredd/actions/workflows/run-smoke-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-smoke-tests.yml)
[![Build Status](https://ci.appveyor.com/api/projects/status/n3ixfxh72qushyr4/branch/master?svg=true)](https://ci.appveyor.com/project/Apiary/dredd/branch/master)
[![Documentation Status](https://readthedocs.org/projects/dredd/badge/?version=latest)](https://readthedocs.org/projects/dredd/builds/)
[![Known Vulnerabilities](https://snyk.io/test/npm/dredd/badge.svg)](https://snyk.io/test/npm/dredd)
Expand Down Expand Up @@ -92,8 +94,8 @@ $ npm install -g dredd
[api blueprint]: https://apiblueprint.org/
[api blueprint tutorial]: https://apiblueprint.org/documentation/tutorial.html
[api blueprint examples]: https://github.com/apiaryio/api-blueprint/tree/master/examples
[openapi 2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
[openapi 3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md
[openapi 2]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
[openapi 3]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md
[documentation]: https://dredd.org/en/latest/
[changelog]: https://github.com/apiaryio/dredd/releases
[contributor's guidelines]: https://dredd.org/en/latest/contributing/
Expand Down
2 changes: 1 addition & 1 deletion docs/_extensions/ghlink_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_external(self):
self.assertTrue(check_uri('https://apiblueprint.org'))

def test_github(self):
self.assertTrue(check_uri('https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md'))
self.assertTrue(check_uri('https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md'))

def test_relevant_github_repo_but_irrelevant_path(self):
self.assertTrue(check_uri('https://github.com/apiaryio/dredd/issues/820'))
Expand Down
4 changes: 2 additions & 2 deletions docs/_extensions/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
SPECS = {
'apib': ('API Blueprint', 'https://apiblueprint.org/documentation/specification.html#{anchor}'),
'mson': ('MSON', 'https://apiblueprint.org/documentation/mson/specification.html#{anchor}'),
'openapi2': ('OpenAPI 2', 'https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#user-content-{anchor}'),
'openapi3': ('OpenAPI 3', 'https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#user-content-{anchor}'),
'openapi2': ('OpenAPI 2', 'https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md'), # TODO: re-add #{anchor}, fix yarn docs:lint
'openapi3': ('OpenAPI 3', 'https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#{anchor}'),
}


Expand Down
4 changes: 2 additions & 2 deletions docs/_links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

.. OpenAPI specification

.. _OpenAPI 2: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
.. _OpenAPI 3: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md
.. _OpenAPI 2: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
.. _OpenAPI 3: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md


.. JSON Schema
Expand Down
5 changes: 0 additions & 5 deletions docs/hooks/perl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Writing Dredd Hooks In Perl
===========================

|Build Status|

`GitHub repository <https://github.com/ungrim97/Dredd-Hooks>`__

Perl hooks are using :ref:`Dredd’s hooks handler socket interface <hooks-new-language>`. For using Perl hooks in Dredd you have to have :ref:`Dredd already installed <quickstart>`
Expand Down Expand Up @@ -232,6 +230,3 @@ Remove trailing newline character in expected *plain text* bodies
$transaction->{expected}{body} = chomp($transaction->{expected}{body});
}
});

.. |Build Status| image:: https://api.travis-ci.org/ungrim97/Dredd-Hooks.svg?branch=master
:target: https://api.travis-ci.org/ungrim97/Dredd-Hooks.svg?branch=master
6 changes: 3 additions & 3 deletions docs/how-it-works.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ If Dredd isn’t able to infer any value for a required parameter, it will termi
Request Headers
~~~~~~~~~~~~~~~

In `OpenAPI 2`_ documents, HTTP headers are inferred from ``"in": "header"`` parameters (:openapi2:`parameterobject`). HTTP headers significant for content negotiation are inferred according to following rules:
In `OpenAPI 2`_ documents, HTTP headers are inferred from ``"in": "header"`` parameters (:openapi2:`parameter-object`). HTTP headers significant for content negotiation are inferred according to following rules:

- ``consumes`` (:openapi2:`swaggerconsumes`) is propagated as request’s ``Content-Type`` header.
- ``produces`` (:openapi2:`swaggerproduces`) is propagated as request’s ``Accept`` header.
Expand All @@ -173,7 +173,7 @@ This order :apib:`exactly follows the API Blueprint specification <relation-of-b
OpenAPI 2
^^^^^^^^^

The effective request body is inferred from ``"in": "body"`` and ``"in": "formData"`` parameters (:openapi2:`parameterobject`).
The effective request body is inferred from ``"in": "body"`` and ``"in": "formData"`` parameters (:openapi2:`parameter-object`).

If body parameter has ``schema.example`` (:openapi2:`schemaexample`), it is used as a raw JSON sample for the request body. If it’s not present, Dredd’s `OpenAPI 2 adapter <https://github.com/apiaryio/api-elements.js/tree/master/packages/openapi2-parser>`__ generates sample values from the JSON Schema provided in the ``schema`` (:openapi2:`parameterschema`) property. Following rules apply when the adapter fills values of the properties, ordered by precedence:

Expand Down Expand Up @@ -255,6 +255,6 @@ You can tell Dredd to use HTTP(S) proxy for:
- downloading API description documents (the positional argument :option:`api-description-document` or the :option:`--path` option accepts also URL)
- :ref:`reporting to Apiary <using-apiary-reporter-and-apiary-tests>`

Dredd respects ``HTTP_PROXY``, ``HTTPS_PROXY``, ``NO_PROXY``, ``http_proxy``, ``https_proxy``, and ``no_proxy`` environment variables. For more information on how those work see `relevant section <https://github.com/request/request#user-content-proxies>`__ of the underlying library’s documentation.
Dredd respects ``HTTP_PROXY``, ``HTTPS_PROXY``, ``NO_PROXY``, ``http_proxy``, ``https_proxy``, and ``no_proxy`` environment variables. For more information on how those work see `relevant section <https://github.com/request/request>`__ of the underlying library’s documentation.

Dredd intentionally **does not support HTTP(S) proxies for testing**. Proxy can deliberately modify requests and responses or to behave in a very different way then the server under test. Testing over a proxy is, in the first place, testing of the proxy itself. That makes the test results irrelevant (and hard to debug).
6 changes: 3 additions & 3 deletions docs/how-to-guides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ If you describe a JSON body which has attributes ``name`` and ``size``, the foll
It’s because properties are optional by default in both `MSON`_ and `JSON Schema`_ and you need to explicitly specify them as required.

- In API Blueprint’s :apib:`Attributes <def-attributes-section>` section, you can use ``required`` (:mson:`353-type-attribute`).
- In API Blueprint’s :apib:`Schema <def-schema-section>` sections and in OpenAPI 2 you can use ``required`` (`spec <https://json-schema.org/understanding-json-schema/reference/object.html#required-properties>`__), where you list the required properties. (Note this is true only for the `Draft v4 <https://tools.ietf.org/html/draft-zyp-json-schema-04>`__ JSON Schema, in older versions the ``required`` functionality was done differently.)
- In API Blueprint’s :apib:`Schema <def-schema-section>` sections and in OpenAPI 2 you can use ``required`` (`spec <https://json-schema.org/understanding-json-schema/reference/object.html>`__), where you list the required properties. (Note this is true only for the `Draft v4 <https://tools.ietf.org/html/draft-zyp-json-schema-04>`__ JSON Schema, in older versions the ``required`` functionality was done differently.)

Validating Structure of Array Items
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -452,7 +452,7 @@ If you describe a JSON body which has attributes ``name`` and ``size``, the foll
If the size should be always equal to 300, you need to specify the fact in your API description.

- In API Blueprint’s :apib:`Attributes <def-attributes-section>` sections you can mark your property with ``fixed`` (:mson:`353-type-attribute`), which turns the sample value into a required value. You can also use ``enum`` (:mson:`212-structure-types`) to provide a set of possible values.
- In API Blueprint’s :apib:`Schema <def-schema-section>` sections and in OpenAPI 2 you can use ``enum`` (`spec <https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values>`__) with one or more possible values.
- In API Blueprint’s :apib:`Schema <def-schema-section>` sections and in OpenAPI 2 you can use ``enum`` (`spec <https://json-schema.org/understanding-json-schema/reference/enum>`__) with one or more possible values.

Integrating Dredd with Your Test Suite
--------------------------------------
Expand Down Expand Up @@ -732,7 +732,7 @@ Example Values for Request Parameters

While example values are natural part of the API Blueprint format, the OpenAPI 2 specification allows them only for ``body`` request parameters (``schema.example``).

However, Dredd needs to know what values to use when testing described API, so it supports ``x-example`` :openapi2:`vendor extension property <vendorextensions>` to overcome the OpenAPI 2 limitation:
However, Dredd needs to know what values to use when testing described API, so it supports ``x-example`` :openapi2:`vendor extension property <specification-extensions>` to overcome the OpenAPI 2 limitation:

.. code-block:: openapi2

Expand Down
6 changes: 3 additions & 3 deletions docs/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To hack Dredd locally, clone the repository and run ``npm install`` to install J
Commit message format
~~~~~~~~~~~~~~~~~~~~~

`Semantic Release <https://github.com/semantic-release/semantic-release>`__ automatically manages releasing of new Dredd versions to the `npm <https://www.npmjs.com/>`_ registry. It makes sure correct version numbers get increased according to the **meaning** of your changes once they are added to the ``master`` branch. This requires all commit messages to be in a specific format, called `Conventional Changelog <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#user-content--git-commit-guidelines>`__:
`Semantic Release <https://github.com/semantic-release/semantic-release>`__ automatically manages releasing of new Dredd versions to the `npm <https://www.npmjs.com/>`_ registry. It makes sure correct version numbers get increased according to the **meaning** of your changes once they are added to the ``master`` branch. This requires all commit messages to be in a specific format, called `Conventional Changelog <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md>`__:

.. code-block:: text

Expand Down Expand Up @@ -304,10 +304,10 @@ MSON spec
Simplifies linking the `MSON`_ spec. Usage: ``:mson:`353-type-attribute```

OpenAPI 2 spec
Simplifies linking the `OpenAPI 2`_ spec. Usage: ``:openapi2:`parameterobject```
Simplifies linking the `OpenAPI 2`_ spec. Usage: ``:openapi2:`parameter-object```

OpenAPI 3 spec
Simplifies linking the `OpenAPI 3`_ spec. Usage: ``:openapi3:`parameterobject```
Simplifies linking the `OpenAPI 3`_ spec. Usage: ``:openapi3:`parameter-object```

RFCs
Simplifies linking the RFCs. Not a custom extension in fact, this is provided by Sphinx out of the box. Usage: ``:rfc:`1855```
Expand Down
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ pygments-apiblueprint==0.2.0
sphinx-tabs==3.2.0
sphinx-panels==0.6.0
myst-parser==0.15.2
sphinxcontrib-applehelp==1.0.4
sphinxcontrib.devhelp==1.0.2
sphinxcontrib.htmlhelp==2.0.1
sphinxcontrib.serializinghtml==1.1.5
sphinxcontrib.qthelp==1.0.3

# dev dependencies
sphinx-autobuild==2021.3.14
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"commitlint-circle": "1.0.0",
"lerna": "^3.22.1"
},
"workspaces": {
Expand Down
Loading
Loading