Update node.js.yml #9
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: Node.js CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
- name: Install mkcert | |
run: | | |
sudo apt-get install -y libnss3-tools | |
wget https://dl.filippo.io/mkcert/latest?for=linux/amd64 -O mkcert | |
chmod +x mkcert | |
sudo mv mkcert /usr/local/bin/ | |
- name: Set up local CA | |
run: mkcert -install | |
- run: npm run makecerts | |
- name: Set up Puppeteer with mkcert CA | |
run: | | |
sudo cp "$(mkcert -CAROOT)/rootCA.pem" /usr/local/share/ca-certificates/mkcert-ca.crt | |
sudo update-ca-certificates | |
- run: npm run build --if-present | |
- run: npm test |