generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (36 loc) · 1.5 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
main-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: bazel test //...
# Don't run the requirements test because the ubuntu runner's python version doesn't necessarily match
# the development host's.
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test -- //... -//pycross/private:requirements_test
smoke-test:
name: Smoke test/generate - Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# This needs to stay in sync with tests/smoke/WORKSPACE
python-version: ["3.10.12", "3.11.6", "3.12.0"]
steps:
- uses: actions/checkout@v2
- name: run smoke tests
working-directory: tests/smoke
run: bazel test //... --@rules_python//python/config_settings:python_version=${{ matrix.python-version }}