xmllint add file to look into #21
This file contains hidden or 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: "Flawless Integration" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
integration: | |
name: Analyze Integration | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- name: Install Dependencies | |
run: npm i | |
- name: Execute Rollup Script | |
run: npm run rollup | |
- name: Publish Repository to Yalc | |
run: npx yalc publish | |
- name: Create Integration Project | |
run: npx create-react-app integration | |
- name: Use Package In Integration Project | |
run: | | |
cd integration | |
npx yalc add fetch-loading | |
npm i | |
cat package.json | grep fetch-loading || exit 1 | |
- name: Override App.jsx | |
run: | | |
cat <<EOF > integration/src/App.jsx | |
import { FetchLoading } from 'fetch-loading' | |
const App = () => { | |
return <FetchLoading /> | |
} | |
export default App | |
EOF | |
- name: Start React App | |
run: | | |
cd integration | |
npm start & | |
sleep 60 | |
curl -fsS http://localhost:3000 -o output.html | |
xmllint --html --xpath "//*[contains(@style, 'display: flex')]" output.html || exit 1 |