diff --git a/.github/workflows/.ci.yml.swp b/.github/workflows/.ci.yml.swp new file mode 100644 index 000000000..6233a25b1 Binary files /dev/null and b/.github/workflows/.ci.yml.swp differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..2cbe2b82c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +# Trigger workflow on pull requests to main and on push to main +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + + steps: + # Checkout the code from the PR branch or push branch + - name: Checkout code + uses: actions/checkout@v4 + + # Setup Node.js environment + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + + # Install dependencies + - name: Install dependencies + run: npm install + + # Run tests + - name: Run tests + run: npm test + + # Print Node.js version (optional, for verification) + - name: Node version + run: node --version + diff --git a/README.md b/README.md index 7c219b456..05808f6d3 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,5 @@ npm run dev _This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`. You do _not_ need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course! + +dd