Skip to content

Commit

Permalink
Merge branch 'master' into golang
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed Apr 4, 2024
2 parents 3f3adbf + ece8a20 commit 18e9e1b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 19 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# run all tests for crawler-user-agents (python/php)

name: CI validation

on:
# https://stackoverflow.com/questions/64635032/github-actions-run-on-push-to-all-branches
push:
branches:
- '**'
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: pip3 install jsonschema pytest
- run: py.test -vv
- run: python3 validate.py
- run: php validate.php
30 changes: 11 additions & 19 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
# Continuous Delivery to https://www.npmjs.com/package/crawler-user-agents
# for each commit, with provenance

name: Node.js Package
name: Deploy to NPM

on:
push:
branches:
- master
# push:
# branches:
# - master
workflow_run:
workflows: [CI validation]
branches: [master]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: pip3 install jsonschema pytest
- run: py.test -vv
- run: python3 validate.py
- run: php validate.php

publish-npm:
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write # To attach provenance to the published package
Expand Down

0 comments on commit 18e9e1b

Please sign in to comment.