Add windows and macos to CI build matrix #12
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: CI | |
on: | |
pull_request: | |
branches: | |
- '*' | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Lint | |
run: make clean deps lint | |
test: | |
name: Test - ${{ matrix.os }} x Node v${{ matrix.node_version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node_version: | |
- '16' | |
- '18' | |
- '20' | |
- 'lts/*' | |
- 'latest' | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: npm | |
- name: Setup docker (MacOS) | |
if: runner.os == 'macos' | |
run: | | |
brew install docker | |
colima start | |
- name: Show env | |
run: | | |
node --version | |
uname -a | |
docker --version | |
- name: Compile | |
run: make clean deps compile | |
- name: Setup Postgres | |
env: | |
DOCKER_OPTS: '--detach' | |
run: | | |
bin/postgres-server | |
for i in {1..10} | |
do | |
if pg_isready -h 127.0.0.1 | |
then | |
break | |
fi | |
sleep 1 | |
done | |
- name: Test | |
run: make test-cov | |
- name: Upload Coverage | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |