-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Resolve .localhost domains on macOS
By default, macOS does not resolve domains on the `.localhost` tld. However we do use this tld for our tests so we need to add `dnsmasq` and resolve these domains on the CI or some tests will fail. We don't really know why some of them were passing before though.
- Loading branch information
1 parent
73ecd82
commit 753ca3c
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Setup cozy-stack | ||
author: Erwan Guyader | ||
description: Setup dnsmasq for .localhost domains on macOS | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install dnsmasq | ||
shell: bash | ||
run: brew install dnsmasq | ||
|
||
- name: Add address entry to point .localhost to 127.0.0.1 | ||
shell: bash | ||
run: echo "address=/.localhost/127.0.0.1" >> "$(brew --prefix)"/etc/dnsmasq.conf | ||
|
||
- name: Start dnsmasq | ||
shell: bash | ||
run: sudo brew services start dnsmasq | ||
|
||
- name: Create resolver configuration | ||
shell: bash | ||
run: | | ||
sudo mkdir -p /etc/resolver | ||
echo "nameserver 127.0.0.1" | sudo tee /etc/resolver/localhost |
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