Skip to content

Commit 1a12a8a

Browse files
authored
chore: Create tests.yml (#183)
Convert from CircleCI to Github Actions
1 parent f798e73 commit 1a12a8a

File tree

3 files changed

+64
-297
lines changed

3 files changed

+64
-297
lines changed

packages/proto-plus/.circleci/config.yml

Lines changed: 0 additions & 288 deletions
This file was deleted.

packages/proto-plus/.github/sync-repo-settings.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ branchProtectionRules:
55
- pattern: master
66
isAdminEnforced: true
77
requiredStatusCheckContexts:
8-
- 'ci/circleci: docs'
9-
- 'ci/circleci: style-check'
10-
- 'ci/circleci: unit-3.6'
11-
- 'ci/circleci: unit-3.7'
12-
- 'ci/circleci: unit-3.8'
13-
- 'ci/circleci: unit-3.9'
14-
- 'ci/circleci: unit-cpp-3.6'
15-
- 'ci/circleci: unit-cpp-3.7'
16-
- 'ci/circleci: unit-cpp-3.8'
8+
- 'style-check'
9+
- 'docs'
10+
- 'unit'
1711
- 'cla/google'
1812
requiredApprovingReviewCount: 1
1913
requiresCodeOwnerReviews: true
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Tests
2+
3+
# Controls when the action will run.
4+
on:
5+
pull_request:
6+
push:
7+
branches: [ $default-branch ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
style-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python 3.8
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.8
21+
- name: Install black
22+
run: pip install black==19.10b0
23+
- name: Check diff
24+
run: black --diff --check .
25+
docs:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Set up Python 3.8
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: 3.8
33+
- name: Install nox.
34+
run: python -m pip install nox
35+
- name: Build the documentation.
36+
run: nox -s docs
37+
unit:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python: [3.6, 3.7, 3.8, 3.9]
42+
variant: ['', cpp]
43+
# Note: as of 2021-02-09, there are no 3.9 python wheels for protobuf/grpc
44+
exclude:
45+
- python: 3.9
46+
variant: cpp
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Set up Python ${{ matrix.python }}
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ matrix.python }}
53+
- name: Install nox and codecov.
54+
run: |
55+
pip install nox
56+
pip install codecov
57+
- name: Run unit tests.
58+
run: nox -s unit${{ matrix.variant }}-${{ matrix.python }}
59+
- name: Submit coverage data to codecov.
60+
run: codecov
61+
if: always()

0 commit comments

Comments
 (0)