mas/.github/workflows/build-test.yml
2021-12-24 13:58:56 -07:00

54 lines
1.6 KiB
YAML

#
# .github/workflows/build-test.yml
#
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
name: Build, Test, and Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
# https://github.com/actions/runner/issues/805#issuecomment-942784948
# https://github.com/rolpdog/cffi-mirror/blob/release-1.15/.github/workflows/ci.yaml#L81-L141
# https://github.com/actions/virtual-environments/issues/2187#issuecomment-790507204
defaults:
run:
# shell: ${{ matrix.run_wrapper || 'bash --noprofile --norc -eo pipefail {0}' }}
# run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0}
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
name: Build, Test, and Lint
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
# https://github.com/mas-cli/mas/settings/actions/runners
# runs-on: macos-latest
runs-on: [self-hosted, macOS]
steps:
# https://github.com/actions/checkout#usage
- uses: actions/checkout@v2
with:
# Fetch tags for script/version
fetch-depth: 0
- name: Bootstrap
run: script/bootstrap
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsenv
- name: Build
run: script/build
- name: Test
run: script/test
- name: Lint
run: script/lint