-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from CircleCI to GitHubActions
Reasons: * lots of random failures in CircleCI * logging/auth issues with CircleCI * contributors don't have to leave GitHub when helping out with the project
- Loading branch information
Showing
11 changed files
with
138 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Prepare nix-shell" | ||
description: | ||
Download cache, build nix-shell and potentially upload any new | ||
derivations to cache | ||
|
||
inputs: | ||
cachix_auth_token: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: pyramid-openapi3 | ||
authToken: '${{ inputs.cachix_auth_token }}' | ||
|
||
- name: Build nix-shell | ||
shell: bash | ||
run: nix-shell --run "echo 'nix-shell successfully entered'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Run all tests, linters, code analysis and other QA tasks on | ||
# every push to master and PRs. | ||
|
||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
# To SSH into the runner to debug a failure, add the following step before | ||
# the failing step | ||
# - uses: lhotari/action-upterm@v1 | ||
# with: | ||
# limit-access-to-actor: true | ||
|
||
# Prevent multiple jobs running after fast subsequent pushes | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
test_310: | ||
name: "Python 3.10 Tests" | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/nix-shell | ||
with: | ||
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- name: Run linters and unit tests | ||
run: | | ||
nix-shell --run "make lint all=true" | ||
nix-shell --run "make types" | ||
nix-shell --run "make unit" | ||
- name: Run tests for the singlefile example | ||
run: | | ||
cd examples/singlefile | ||
nix-shell --run "python -m unittest app.py" | ||
- name: Run tests for the todoapp example | ||
run: | | ||
cd examples/todoapp | ||
nix-shell --run "python -m unittest tests.py" | ||
- name: Run tests for the splitfile example | ||
run: | | ||
cd examples/splitfile | ||
nix-shell --run "python -m unittest tests.py" | ||
- name: Save coverage report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: htmlcov | ||
path: htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../shell.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../shell.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../shell.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters