Skip to content

Commit

Permalink
Add GitHub build and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dokkie8844 committed Dec 28, 2023
1 parent 10f90a5 commit 18f3484
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-test"
build-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Install FPC
- name: Install FPC
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y fpc
# Compile tests
- name: Compile tests
run: fpc -Fu$GITHUB_WORKSPACE/src $GITHUB_WORKSPACE/tests/fpc/testsqids.lpr

# Run compiled test program
- name: Run tests
run: $GITHUB_WORKSPACE/tests/fpc/testsqids

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# [Sqids Pascal](https://sqids.org/pascal)

![Build and Test workflow](https://github.com/sqids/sqids-pascal/actions/workflows/build-test.yml/badge.svg?event=push)

[Sqids](https://sqids.org/pascal) (*pronounced "squids"*) is a small library that lets you **generate unique IDs from numbers**. It's good for link shortening, fast & URL-safe ID generation and decoding back into numbers for quicker database lookups.

Features:
Expand Down

0 comments on commit 18f3484

Please sign in to comment.