Skip to content

Commit

Permalink
Merge pull request #1 from mozilla/branch
Browse files Browse the repository at this point in the history
chore(): should not work
  • Loading branch information
KevinMind authored Nov 24, 2023
2 parents 54bd508 + b84bbcd commit 178a7e1
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci build
run-name: ${{ github.actor }} is learning GitHub Actions
on:
pull_request:
merge_group:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm i
- name: Build
run: npm run build
env:
CI_DELAY: "60000"
CI_FAIL: ""
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# test-github-features
Repo to test github settings for PRs, CI, merging

Cannot push to main.
Repo to test github settings for PRs, CI, merging
18 changes: 18 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env node

const delay = parseInt(process.env.CI_DELAY || 3_000, 10);
const shouldFail = Boolean(process.env.CI_FAIL || '');

console.log('config', {delay, shouldFail, raw: { delay: process.env.CI_DELAY, shouldFail: process.env.CI_FAIL}});

await new Promise((resolve, reject) => {
console.log(`Running build... for ${delay / 1000} seconds`);
setTimeout(() => {
if (shouldFail) {
return reject('failing.... booo');
}
resolve(true);
}, delay);
});

console.log("Built!");
7 changes: 7 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "test-github-features",
"version": "1.0.0",
"description": "Repo to test github settings for PRs, CI, merging",
"main": "index.js",
"scripts": {
"build": "node ./build.mjs"
},
"author": "",
"license": "ISC"
}

0 comments on commit 178a7e1

Please sign in to comment.