build-test #824
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
name: 'build-test' | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 1 * * SUN' | |
workflow_dispatch: | |
jobs: | |
build_and_unit_test: | |
name: '${{ matrix.os }}: build and unit tests' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
# How to consume GitHub packages, from this message (!): https://github.community/t/download-from-github-package-registry-without-authentication/14407/35 | |
# Inspired from here: https://github.com/jcansdale-test/npmrc-configurations/blob/master/.github/workflows/blank.yml | |
- name: Authenticate to GitHub Packages | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | |
echo "@${{ github.repository_owner }}:registry=https://npm.pkg.github.com/" >> ~/.npmrc | |
- run: | | |
npm install | |
npm run test | |
name: build and test | |
shell: bash | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel: true | |
flag-name: ${{ matrix.os }}-build_and_unit_test | |
base-path: ${{ runner.os != 'macOS' && '__tests__/theAssets/vcpkg_project/' || '' }} | |
debug: true | |
tests: | |
name: '${{ matrix.os }}: functional tests' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: checkout this action | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: basic test for run-vcpkg (not running vcpkg). | |
uses: ./ | |
with: | |
vcpkgDirectory: ${{ github.workspace }}/vcpkg | |
vcpkgGitCommitId: 'c9f906558f9bb12ee9811d6edc98ec9255c6cda5' | |
vcpkgGitUrl: 'https://github.com/microsoft/vcpkg.git' | |
- name: basic test for run-vcpkg with running 'vcpkg install'. | |
uses: ./ | |
with: | |
vcpkgDirectory: ${{ github.workspace }}/vcpkg | |
vcpkgGitCommitId: 'c9f906558f9bb12ee9811d6edc98ec9255c6cda5' | |
runVcpkgInstall: true | |
vcpkgGitUrl: 'https://github.com/microsoft/vcpkg.git' | |
env: | |
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed | |
tests_with_cache_hit: | |
needs: tests | |
name: '${{ matrix.os }}: functional tests' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: checkout this action | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: basic test for run-vcpkg (not running vcpkg). | |
uses: ./ | |
with: | |
vcpkgDirectory: ${{ github.workspace }}/vcpkg | |
vcpkgGitCommitId: 'c9f906558f9bb12ee9811d6edc98ec9255c6cda5' | |
vcpkgGitUrl: 'https://github.com/microsoft/vcpkg.git' | |
finalize_coveralls: | |
needs: build_and_unit_test | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
steps: | |
- name: Finalize Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
carryforward: "macos-latest-build_and_unit_test,ubuntu-latest-build_and_unit_test,windows-latest-build_and_unit_test" | |
debug: true |