Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tool installation, dockerize #8

Open
wants to merge 75 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2e93733
Fix ruby
elijahr Nov 10, 2022
d2212ae
Ignore lock
elijahr Nov 10, 2022
b7299b9
GNU Parallel
elijahr Nov 10, 2022
21183f3
Install uncrustify
elijahr Nov 10, 2022
67b4338
Use asdf
elijahr Dec 1, 2022
736794f
prettier output
elijahr Dec 1, 2022
d19ede2
Update changelog
elijahr Dec 1, 2022
60a7780
Install tools
elijahr Dec 1, 2022
24cf500
Dockerize
elijahr Dec 3, 2022
6c2303c
Fix python build
elijahr Dec 3, 2022
421f4b1
Use lockfiles
elijahr Dec 3, 2022
80b119a
Fix some tests
elijahr Feb 26, 2023
e9c06ba
Fix docker + mkdir
elijahr Feb 26, 2023
af3f743
Fix docker
elijahr Feb 26, 2023
66086c5
Fix docker and tests
elijahr Feb 27, 2023
019d2c7
prettier and eslint as separate steps
elijahr Mar 4, 2023
e7c3735
Fix many tests
elijahr Mar 7, 2023
b0baa61
fix tests
elijahr Mar 7, 2023
07b1d38
Fix tests
elijahr Mar 8, 2023
6e4c237
Use existing temp dir
elijahr Mar 8, 2023
0e92a70
Run tests in tools
elijahr Mar 8, 2023
d2e84ec
lint
elijahr Mar 8, 2023
71d04a1
No clippy
elijahr Mar 8, 2023
d924d85
Docker improvements
elijahr Mar 9, 2023
068865f
env vars
elijahr Mar 9, 2023
8d1bf5d
Remove test
elijahr Mar 9, 2023
402cb72
runs-on
elijahr Mar 9, 2023
967665e
fix
elijahr Mar 9, 2023
c90db97
fix
elijahr Mar 9, 2023
c06d687
fix
elijahr Mar 9, 2023
ad844e5
Lint w docker
elijahr Mar 9, 2023
1856be6
just docker
elijahr Mar 9, 2023
ad0c7b1
workflow
elijahr Mar 11, 2023
cdef3e5
rm build-docker.sh
elijahr Mar 11, 2023
1f0c525
entrypoint
elijahr Mar 11, 2023
63af170
Fix path
elijahr Mar 11, 2023
ac0b174
Fix eslint plugin resolution
elijahr Mar 11, 2023
85a1d83
host.docker.internal
elijahr Mar 11, 2023
e3c5334
insecure registry
elijahr Mar 11, 2023
78e2db9
Simplify build
elijahr Mar 11, 2023
6ce53f4
set LINTBALL_DIR
elijahr Mar 11, 2023
e3687b8
shellcheck
elijahr Mar 11, 2023
5d83302
Optimize docker build, fix parallel test execution
elijahr Mar 11, 2023
d76297d
Fix path
elijahr Mar 11, 2023
52ab2ad
reshim
elijahr Mar 12, 2023
41e6aaf
Fix test image
elijahr Mar 12, 2023
2785eb6
enable experimental features
elijahr Mar 13, 2023
6244f51
buildx ls
elijahr Mar 13, 2023
c3c948b
push
elijahr Mar 13, 2023
24b3da7
disable
elijahr Mar 13, 2023
c668331
Optimize binary file handling
elijahr Mar 13, 2023
ca3a351
fix tests
elijahr Mar 14, 2023
8ace52e
safer find run
elijahr Mar 16, 2023
2d83b58
Fix test
elijahr Mar 16, 2023
5725652
Simplify binary file check
elijahr Mar 16, 2023
47cde46
Optimizations - use `read` where possible
elijahr Apr 5, 2024
84a859e
Fix tests
elijahr Apr 5, 2024
35894e6
Bump versions
elijahr Apr 5, 2024
95684e3
Copypaste issue
elijahr Apr 5, 2024
066f3fd
Upgrades
elijahr Apr 5, 2024
2cbcc35
Fix prettier
elijahr Apr 5, 2024
21b36e9
Bump tool versions, fix some tests
elijahr Apr 7, 2024
0bee444
Fix tests
elijahr Apr 7, 2024
a12f49c
Fix test
elijahr Apr 8, 2024
e8268d3
Fix docker
elijahr Apr 9, 2024
d6600d5
Fix shfmt
elijahr Apr 9, 2024
bb62b97
Fix tests
elijahr Apr 10, 2024
4f880a1
Fix tests
elijahr Apr 10, 2024
a02b744
Fix docker build
elijahr Apr 19, 2024
ba46585
Reduce duplicate builds
elijahr Apr 19, 2024
ab624f4
Fix docker
elijahr Apr 19, 2024
b51a8cc
Don’t test as part of docker deploy
elijahr Apr 19, 2024
946f566
Better tagging/caching for docker build
elijahr Apr 19, 2024
7a29ab9
Less noise in output
elijahr May 7, 2024
5c0b786
Docker improvements
elijahr May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.*
*
!.gitignore
!.lintballrc.json
!bin/
!configs/
!docker/
!githooks/
!lib/
!LICENSE
!package-lock.json
!package.json
!README.md
!scripts/
!test/
!tools/.eslintrc.cjs
!tools/.prettierrc.json
!tools/Gemfile
!tools/Gemfile.lock
!tools/package-lock.json
!tools/package.json
!tools/pip-requirements.txt
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
binary_next_line = true
switch_case_indent = true
space_redirects = true
keep_padding = false
function_next_line = true
never_split = true

[*.sh]
shell_variant = posix

[*.py]
indent_size = 4

[tools/.bundle]
ignore = true
[tools/asdf]
ignore = true
[tools/bin]
ignore = true
[tools/node_modules]
ignore = true
[tools/uncrustify-*]
ignore = true
126 changes: 60 additions & 66 deletions .github/workflows/workflow.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@
name: Test
on:
pull_request:
branches: ['*']
branches: ["*"]
push:
branches: ['*']
tags: ['*']
branches: ["devel"]
tags: ["*"]

jobs:
tests:
lint:
name: lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install tools
shell: bash
run: ./bin/lintball install-tools

- name: Run lintball
shell: bash
run: ./bin/lintball check

test:
name: bats unit tests (${{ matrix.runs-on }})
strategy:
fail-fast: false
Expand All @@ -22,95 +38,49 @@ jobs:
runs-on: ${{ matrix.runs-on }}

steps:
- name: Upgrade bash
if: runner.os == 'macOS'
- name: Install macOS dependencies
if: ${{ runner.os == 'macOS' }}
run: brew install bash

- name: Checkout code
uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'

- uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install shfmt
uses: mfinelli/setup-shfmt@v2
uses: actions/checkout@v3

- uses: actions/setup-node@v2
with:
node-version: '16.x'

- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly

- uses: asdf-vm/actions/install@v1
with:
tool_versions: |
nim ref:version-1-6
node-version: "16.x"

- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly

- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
- uses: dtolnay/rust-toolchain@nightly

- name: Install tools
shell: bash
run: |
set -euxo pipefail

npm install --include=dev --verbose

cd tools
npm ci --verbose
# seems to be necessary for node >= 15
[ -n "$(which bats)" ] || npm link bats --verbose
cd ..

./bin/lintball install-tools --all --yes
./bin/lintball install-tools --all

- name: Run tests
run: |
npm run test -- --jobs $(nproc)

lint:
name: lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install shfmt
uses: mfinelli/setup-shfmt@v2

- name: Install lintball
shell: bash
run: sudo npm install -g "https://github.com/${GITHUB_REPOSITORY}.git#${GITHUB_SHA}"

- name: Install tools
shell: bash
run: lintball install-tools --yes

- name: Run lintball
shell: bash
run: lintball check
cd tools
npm run test

install-local:
name: test local installation
runs-on: ubuntu-latest

steps:
- name: Install lintball
shell: bash
run: npm install "https://github.com/${GITHUB_REPOSITORY}.git#${GITHUB_SHA}"

- name: Install tools
run: npx lintball install-tools --all

- name: Run lintball
shell: bash
run: npx lintball --help

install-global:
Expand All @@ -119,9 +89,33 @@ jobs:

steps:
- name: Install lintball
shell: bash
run: sudo npm install -g "https://github.com/${GITHUB_REPOSITORY}.git#${GITHUB_SHA}"

- name: Install tools
run: sudo lintball install-tools --all

- name: Run lintball
shell: bash
run: lintball --help

build-docker:
name: "build & push docker"
runs-on: ubuntu-latest
needs: [lint, test, install-local, install-global]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: "Build & push"
run: ./scripts/build-and-push-docker-images.bash
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
.DS_Store
**/target
/.bundle
/.vscode
/node_modules
/python-env
/test/target
/test/fixture/target
/tools/asdf
/tools/.bundle
/tools/python-env
/tools/vendor
/tools/uncrustify-0.75.1
/tools/node_modules
/tools/uncrustify*
/tools/bin
/.tmp
/test/.bats
21 changes: 13 additions & 8 deletions .lintballrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"lintballrc_version": "2",
"ignores": [
"*/.git/*",
"*/tools/Gemfile",
"*/node_modules/*",
"*/package-lock.json",
"*/tools/python-env/*",
"*/tools/vendor/*",
"*/tools/target/*",
"*/lib/jwalk/*",
"*/lib/version_compare/*",
"*/test/fixture/*",
"*/test/fixture/target/*"
]
"*/test/target/*",
"*/test/fixture/target/*",
"*/tools/.bundle/*",
"*/tools/asdf/*",
"*/tools/uncrustify*",
"*/tools/Gemfile*"
],
"use": {
"clippy": false,
"stylua": false,
"rubocop": false
}
}
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2154,SC2312
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.1] - 2022-11-09
## [1.7.0] - 2024-04-09

### Added

- consistent tool installation and versioning via asdf
- Docker containers

### Fixed

- python-env creation issue
- pre-commit path issue
- tool installation failing silently

### Removed

- nimfmt support

## [1.6.0] - 2022-11-09

Expand Down
Loading
Loading